The problem I posted about hot keys is experienced in my desktop. I did not have such problem in my laptop. I noticed that the start recording tab in my laptop has a pause symbol to its right, which is not present in my desktop.
I thought of reinstalling obs on my desktop. After reinstallation, there is already the pause symbol to the right of the start recording tab. The hot key I set to toggle between pause and resume recording is now working.
So the problem is solved. Perhaps, the first installation had a problem.