I could not find any reference to the size of the flash within the source files.
I think that the mbed environment is misconfigured. But it’s hard to find any documentation. For example, this file from the commit that you linked: variants/SEEED_XIAO_NRF52840_SENSE/mbed_config.h is automatically generated, but the source of that generated file has not been committed, that’s probably why the feature has been later reverted later.
Try to add this:
Serial.print("bd size = ");
Serial.println((int)bd->size());
I get 0, but since, I have a non-“sense” board, I’m not sure that the test is totally valid. I built the programm and sent it to my board. Anyway I would not be surprised if you get the same result.