It is a bug. On the other hand, your test is not completely correct :o
The XIAO board: https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html.
There is also a wiki.
That is a SAMD21 processor as used in the Arduino Zero and most MKR boards.
It is very small and cheap.
To use it, Seeedstudio wants to add their own development environment to the Arduino IDE.
That is terrible
That means you don't have the latest bug fixes of the Arduino team. Not the many years of Arduino support for that board. They could stop updating it any day.
It is like sitting in a sinking boat, you found the first hole that was eaten into the boat by bugs and you will never know when the boat will sink.
I don't know if they use their own bootloader.
Can you toss it away and buy a MKR board ?
The next best solution is put the Arduino bootloader on it and use it as a Arduino MKR board. You have to make a list of the pins that can be used and some pins might have other numbers.
About your sketch:
I don't understand why the compiler accepts the "Wire.onRequest(*requestEvent) ;", it should be "Wire.onRequest(requestEvent) ;".
Variables that are changed in a interrupt routine and used in the loop() should be "volatile". Without it, it is not certain that you see the actual value of 'num_howmany_zero'. That is the theory. If you see a number increasing then it can only be the interrupt code that increases it.
Creating a buffer runtime and using a String function in a interrupt routine should also be avoided. Therefor, your requestEvent() function can be improved. Using a global buffer that has the data ready is better.
You could report a bug. Would it do any good ? If you continue to use it, then just add a test for 'howMany' and ignore any false call to onReceive.
Maybe an old version of the Arduino had this problem and maybe it was already fixed years ago. Please stop using this board.
P.S.: After writing this, I started to doubt what I wrote. Perhaps it was not the Due that had this problem, perhaps it was with the SAMD21 processors (MKR boards). It could even be possible that the current Arduino IDE still has this same bug. So I downloaded the Seeedstudio development environment and I think it is indeed a older version.
Looking at Issues · arduino/ArduinoCore-samd · GitHub, there seems to be a number of I2C issues with the official Arduino as well for the SAMD21 processors.