The notes on those pins says they can't control a laser. Which may mean won't work with M571.

https://docs.duet3d.com/Duet3D_hardware/Duet_2_family/DueX2_and_DueX5#pin-names

Can you test with a heater/pwm pin?