I contacted MS and it turns out, that afw#setup is not working with Android version 11, when trying to enroll "with work profile". Version 11 is not supported.
For corporate-owned work profile (COPE) devices, the afw#setup enrollment method and the Near Field Communication (NFC) enrollment method are only supported on devices running Android 8-10. They are not available on Android 11. For further details, refer to the Google developer docs
In version 11 it only works by tapping the screen after factory reset