Take a look at this thread. You can increase the time until the message pops up:
Here is the solution from @Ponce-De-Leon how to do it with dconf-editor:
You can install dconf-editor with
"sudo apt install dconf-editor"
Another possibility is to increase the time with a terminal command:
This is the setting by default:
5000ms=5s until the pop-up appears
You can increase this time, e.g. to 60000ms= 60s
"gsettings set org.gnome.mutter check-alive-timeout 60000"