See https://wiki.geany.org/config/all_you_never_wanted_to_know_about_file_saving
Which saving method are you using? Any method other than use_atomic_file_saving is likely to result in the behaviour you describe as indicated in the reference above.
No I don't have use_atomic_file_saving set.
Why not simply checking that the remaining space is greater than the current file size and only allow to save in that case?