If/when I make the jump to actual documentation I use Mermaid so I can keep everything tidy under source control.
The Excalidraw export format is JSON, so you might use that in source control just as well. Or include the format in PNG or SVG export (which draw.io supports also).
In general, if sketching it out, whether alone or with multiple people, using something simple I can click, drag & label is more than enough and helps me keep the flow. (I would stick to actually drawing - either on a whiteboard or something digital - but my handwriting is absolutely atrocious)
As soon as I'm done sketching and move over to actually documenting a concrete solution, something code-based like Mermaid - as you said - is much nicer. But both are entirely different processes for me.
Also this plugin works fine in github.dev so it's like a better version of draw.io official site.