When I have the Windows UI scale set above 100% rs.PopupMenu() no longer appears at the mouse cursor location. I checked using rs.CursorPos(), and it returns the correct screen and world coordinates. I think what is happening is the UI scale factor is getting applied to the popup menu location, scaling it away from the true cursor position.
This code is the workaround I’m using for now (notice the 1.5 correction factor since I’m using 150% UI scale), but it wouldn’t work for someone else using a different scale factor.
screen_point = rs.GetCursorPos()[1]
adjusted_point = rs.XformScreenToWorld(screen_point/1.5, screen_coordinates=True)
rs.PopupMenu(options, modes, point=adjusted_point)