Framerate dips when minecraft is focused, but increases when unfocused

I'm using sodium and iris and my framerate is dipping when I click on minecraft but when I am focused on something else my framerate increases. The displayed framerate is 60, but it looks more like 15 or 10. Is there a known solution for this?
Was this page helpful?