I tend to use .drawio.png extension and then collaborate inside the repo in real-time using vscode live share (https://visualstudio.microsoft.com/services/live-share/) and the drawio extension together (https://marketplace.visualstudio.com/items?itemName=hediet.v...)
Then, in markdown/readmes use .
It will render locally, and in GitHub, and also if you use remark or something like that, it will still render as an image.