You had stated:
cannot get the state to change when the screen pops (note the call has ended as this is what triggers the screen pop)
An agent cannot go into WORK state if they are no longer on the call. You can take a look at the agent state transition here: https://developer.cisco.com/site/finesse/docs/#userchange-agent-state
So, you are probably getting an error when you are moving the agent into work state at that time.