Recently, we had an issue when an item has 2 languages and multiple versions available, if you try to change language on Experience Editor, it returned 500 error.
Normally when you click Experience Editor url is like the following:
when you click language switch on Experience Editor:
So even not on Experience Editor, if you go to this page, it will again throw error.
I reproduce this issue on a clean 9.3 solution and see that Sitecore doesn't let creating a page with same as any folder name under webroot. And we had one in my case.
We solve this issue by removing the folder from CM environment as it was already getting removed from CD server.
My question is there any way we can skip this issue by not removing any folder under webroot?