Limit X axis due to direct drive
Try using a pancake stepper I heard those work quite well, they do have less torque but you can overcome that with gear ratio's like on the bondtech extruders. It should be thin enough so you can use the full volume again. If you dont think that's worth it you should move you X-axis endstop since the homing is where it goes wrong, as far as firmware goes I can't help you in that aspect as well as other would be able too. I hope this helps.