A few flatpak apps stop responding and can't be closed

I think this is only affecting flatpak apps. I have a few apps that are only available as flatpak version. For example, Apostrophe which is my favoured markdown editor. However, this app keeps failing to respond after a while and I can’t close the app. I’ve tried using Mission Center to close it but it fails if done through that too.

Update: I’ve done some testing and this seems to happen to all flatpak apps when the PC is either locked, the screen blanks, or I turn the monitor off and back on again.

At this point I have to say this system us unusable.