it seems that there are two isolated problems you describe:
1) M2P stops playing after powering off the amplifier –> this is 99% an EMI problem. Maybe the RPi looses connection because of the surge current of your amp (if there is an toroidal transformer inside, you have strong inductive currents in the moment of powering off the unit). That can cause a complete crash of the RPi or dac if it is installed nearby the amp. Maybe it helps to place the RPi far away from the amp and use an RCA noise filter (ground isolator) to prevent reverting signal peaks from your amp to the RPi.
2) M2P stops playing after some time –> i read about similar problems on other players (just google for it) without a dedicated solution. There are a lot of possibilities which can cause this problem. Maybe it helps to set some specific settings in LMS: LMS/Settings/Player…on the audio tab for the selected M2P player, you can choose the behavior of the player if the stream is interrupted, e.g. „stop at power off, restart on power on“. Maybe that helps.