Oh no, sorry that happened! Do you mind sharing what platform or browser you were playing on so I can investigate what might have caused that particular bug?
I am on Chrome. 114.0.5735.199
Unfortunately I don't really know why the flag got stuck on screen. I did place an excessive number of flags down, making the mine count go negative, but for all I know I did some weird finger stricking which made the two actions happen at the same time.
Could you add a full puzzle reset button in case these things happen?