That’s because mouse position doesn’t have Z coordinate - it’s on the screen. But scenes indeed have Z coordinate - it goes from the Player (negative values) to depth (positive value). Here Z means Z-sorting, i.e. the scenes with higher Z are further away from the camera. So, if you want to have mouse cursor over all other scenes - be sure to give it the minimal Z coordinate value, e.g. like this:
Mouse.Translation := Vector3(Viewport.PositionTo2DWorld(Window.MousePosition, true), -1);
P.S. Note, that it’s much more readable if you enclose the code pieces in “`” symbols (the back-quote one, which is on the same key where “~” symbol is.
If you use a matching pair those in one line you get
blocks like this.
Or you can put three back-quote symbols on a separate line - and another three in the end to have a big block of code inside
This way your code will be much more readable and won’t lose indentation. (Yes, I didn’t yet look at your code in that topic you’ve mentioned above just for this reason - I can’t such a big piece without any indentation and markup, and indenting it manually would take a lot of time.
For very large pieces of code you might also want to use https://pastebin.com/ or even a public git repository (at GitHub, GitLab or any other convenient git hosting with visual code viewer).