VisualEditor does not properly support wikis without short URLs configured. It will load and mostly work, but there are various issues with anything that references other pages (links, templates, images).
Parsoid has better but still half-hearted support for wikis without short URLs, and some of the issues may actually originate in Parsoid.
Both tools were developed with Wikimedia wikis in mind and unfortunately made some assumptions about how the URLs look like. We've always only supported short URLs, but no one really noticed until the release of MediaWiki 1.35 with its bundled VisualEditor+Parsoid, at which point setting up VisualEditor became easier than setting up short URLs, and many users ran into the problem ;)
Examples:
- Good: URLs like https://en.wikipedia.org/wiki/Example (using $wgArticlePath='/wiki/$1' etc.)
- Good: URLs like https://en.wikipedia.org/w/index.php/Example (using $wgUsePathInfo=true)
- Bad: URLs like https://en.wikipedia.org/w/index.php?title=Example (none of the above)
If you can't set up rewrite rules to get "nice" short URL, try using $wgUsePathInfo=true instead, which might work on your server and will work with VisualEditor.