How to Prevent agent from Logging off/Go Ready while on voice call?

Hi All,
Request your help in understanding how to handle the below Scenario ,
I want to prevent the agent from Logging off from WDE while Agent is in a specific state (Ready Pending/ACW), how do we prevent the agent from Logging off/Going Ready?
Is it possible? How can I implement this in code?

I have just started working with Genesys SDKs, please advice.

can you explain a bit better ?

what state do you want them to log off from?

I am customizing WDE and I am working on top of “Workspace Desktop Edition - Version 8.5.111.21”
I want to prevent the agent from logging off/Go Ready once he attended the call(Ready Pending state).

You can use WDE commands for this purpose - try to read more about commands within the available documentation and samples.