@Simon-3 as @jay_s_uk explains powering the Pi from the Duet's 5V supply is no longer supported.

https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6HC_Hardware_Overview#h-5v

https://docs.duet3d.com/Duet3D_hardware/Duet_3_family/Duet_3_Mainboard_6HC_Hardware_Overview#revision-history