The game doesn't draw the drawLine3D/drawIcon3D requests instantly, and instead it stores them to perform the GPU call by the renderer, as that's the logical thing to do.
The problem, however, is that if you Alt+Tab out and don't check for isGameFocused, the rendered is not working and those requests keep piling up, and are completed when you Alt+Tab back in, resulting in a massive GPU call which freezes the game for several seconds.
Therefore, please forcefully check for isGameFocused before registering that draws in the first place to solve the problem.