It's possible - but I wouldn't recommend it, as it could be a bad user experience.
The solution is simple, though: set the
.isMovable property of the window to
For example, for a
window IBOutlet, setting:
window.isMovable = false
applicationDidFinishLaunching works well.
You can also, for example, use
window.setFrameOrigin(_ point: NSPoint) to first set it at a fixed position.