@aks2161989 as mentioned by @kugel- above:
When opening files within Geany you can click the "View" button instead of "Open" in the dialog. This will open the file in read-only mode.
Just making sure you aren't [using "native dialogs"](https://www.geany.org/manual/current/index.html#miscellaneous), but rather the default GTK+ ones.