Same problem for me after resizing window in my program. I've changed window_mouse_x() to just mouse_x.
mouse_x and mouse_y are the mouse’s position relative to the room, so if you make use of views and cameras it may start to conflict (although if it works for you, that’s all that matters).
The device mouse functions are probably the solution that should work in pretty much all cases, since they’re designed to take the GUI layer into account - I’ll play around with that next chance I get; as long as nothing bad happens I might make that the default.
If absolutely necessary I could make the mouse position value a macro that the user could change depending on their needs, although I doubt it would come down to that.