Although no one replied to me, I have already solved this issue that had been bothering me for a long time. I hope this can help others: uncheck the "Use anti-cheat compatibility hook" option in the OBS capture settings for Apex. The input lag in Apex has now perfectly vanished, making the game as smooth as if OBS wasn't running at all.