Can you try to change the next version to 15.1.7? I also had internal server errors (not only related to dynamic routes) and downgrading next to 15.1.7 solved the issue