Current mirror with a load
What you write is 100% correct. This is a very simple current mirror so you cannot expect that much from it. It only works accurately if (like you mention) M1 and M2 operate under the same conditions. Vds is often different between the two devices as for M2 Vds changes when the load changes.

You could adjust the load connected to M2 such that Vce_M1 = Vce_M2 but that will be a very "narrow" window. I mean, if the supply voltage is increased the Vds_M2 will increase as well and that will change the Id_M2.

The simplest improvement you can use on a two-transistor mirror is to increase the channel length L. This will result in an increase of the output resistance. I generally use an L of at least 0.5 um for a decent mirror. That 0.5 um is somewhat technology dependent so you will have to experiment. Above a certain length a length increase does not help anymore. Increasing the Length while keeping the Width the same will increase Vgs and therefore also Vds_sat so you need more voltage headroom. You can compensate by increasing the Width as well as Length but that will have other effects.

You have to ask yourself, how accurate does my output current need to be?

If it is not accurate enough with a simple 2 transistor mirror then you might need to use a more complex current mirror with 3 or more transistors. A cascode transistor for M2 might also be a solution. It depends on how much accuracy you need and how much voltage headroom for M2 you have.