Matter Switch Setup Failed

When I try to add a wall switch Matter device to HA after a factory reset, by scanning the QR code, the HA app shows a setup failed message. But the device actually gets added to the device list. After 2-3 minutes, I can then control the device normally in the HA app.

Is this a bug with the Matter Commissioner/Controller? Or could it be something else going on?