This is getting interesting. WebDAV also fails with 2FA in NextCloudPi. As soon as 2FA is disabled WebDAV works again.
My 2FA testing differed between NextCloudPi and DietPi instances in that with DietPi, I already had 2FA enabled before setting up WebDAV sync.
Sorry, I no longer have the DietPi instance.