I would check system level logs to start like dmesg and syslog.
Someone else might have better tips of what to grep for in the logs. One thing you could do is try to ssh into the system when it’s locked up and check the logs to see what’s being reported during or immediately before the lockup.
Once you get a sense for what’s going on at a system level you can start to look in more specific logs.
Providing more specific information about what isn’t working would help resolve the issue.
The flathub page lists some additional steps that need to be performed to allow virtual input. Did you do this?