I found the problem after a LOT of investigation:
You have to set your permalinks to default setting – plain : https://yoursite/?p=123
While this is not my preferred option, at least it works for now.
Welcome to our forum.
This probably conflicts with 3rd party plugin, because we use $wp_query as global variable, please try to deactivate others plugin one by to check the issue.
let me know the result.