System_ON_Sleep of XIAO BLE

I supply Vusb with 5V

Are you supplying 5V from XIAO’s USB-C connector?
Are you supplying 5V from the 5V pin of the XIAO?
Where is the multimeter connected?

I will try to measure the current with the sketch you posted.

edit
I am trying to compile your sketch, but I get a lot of errors in my environment and cannot compile it.
It may take some time to investigate.

If you remove the lines about Flash and BLE, will the current consumption decrease? Can you measure it?