A1 Printhead moves off bed during print

You can add this for example and nullifies the whole code preventing the printhead moving away: