I squared the X & Y -axes with the 30/40/50 method, like described here: https://www.youtube.com/watch?v=lU0iZKajpoo

I got the axes squared nicely and added hard stops to both X-axis profiles so it's easy to make sure it's straight every time I start the machine. But it requires me to push the Y-gantry to against both hard stops by hand when I power on the machine, and when I power off the machine, the other gantry plate riding on the X-axis moves around 10mm. So there's some kind of tension in the frame that pulls it out of square when it's "relaxed". I can't figure out which part of the machine I need to adjust to make it stay as square as possible even when it's "relaxed". I have double-checked that the frame is square and the X-axis extrusions are parallel to each other.

Only thing I can now come up with is adding shims to where the Y-axis is attached to the gantry plates, to make it more square. But what can be the root cause of this?