iCloud for Windows does not work when Advanced Data Protection is enabled
When I enable Advanced Data Protection on my iCloud account, I can no longer sign into iCloud for Windows. After entering my password and the 2-factor code, I get this error message:
"To sign in with this account, you need to enter the code from a device that's close by. Make sure Bluetooth is turned on or your Apple device is on the same Wi-Fi network as this computer"
This problem seems to have surfaced a few times in the past, like here: How can I sign in to iCloud on a computer… - Apple Community.
I've reproduced the problem on three PCs now (Windows 10 PC with only Ethernet, different Windows 10 PC with Wi-Fi and Bluetooth, Windows 11 PC with only ethernet). I even bought a bluetooth adapter for the Windows 11 PC that only has ethernet, but that does not change anything.
Once I turn off Advanced Data Protection, I can login on Windows again (and interestingly, it asks me for the 2-factor code twice: once directly after the password, and then after a few seconds again, in a differently styled window).
However, if I turn on ADP while already logged into iCloud for Windows, it just stops synchronising files (without throwing any error message), so that's also not a workaround.
On all PCs, I'm logged into a local account (no Microsoft account). Windows Hello was turned off, but turning it on (via pin code) has no effect either.
Can anyone confirm this is an issue? Has anyone found a workaround or a solution?