Hello Matthew,
When you inspect the element( right click on it and inspect) you can get a sense of how mendix did it:
With the combination with some css especially the (position property)they managed to navigate the red dot on the right spot.
Hope this gives you some insight,
Good luck!
PS read also other posts on this topic for example: https://community.mendix.com/link/space/studio-pro/questions/105682