The circuit diagram for XIAO SAMD21 is incorrect.
I previously asked SeeedStudio about this, and they said they removed the backflow prevention diode on the 5V line.
Therefore, it seems that the 5V terminal can be used as an input.
However, you need to be careful because current will flow back into the USB connector.