MissionGameplay has a function IsControlDisabled() which returns m_ControlDisabled. m_ControlDisabled is being set whenever you enable/disable controls. It is being set to false as soon as its set to true on line
~587 of MissionGameplay within the OnUpdate function.
if( playerPB ) { if( !menu && m_ControlDisabled && !playerPB.GetCommand_Melee2() ) { PlayerControlEnable(true); } }