To me it seems that msys is built against one version of libstdc++ and Geany uses some other from somewhere else.
Exactly this happens because of
https://github.com/geany/geany/pull/4094/commits/110c7b492e8595851131eeb5c38...
I think it would be best if Geany was compiled against the msys version of libstdc++ if possible so both the dependencies and geany are linked against the same library.