This message had details included from my previous issue
Going forth to create a new issue as told, it still persists in the plain vanilla environment without optifine. I didn't download optifine for the purpose to see if the idle freeze continued on the launcher. I waited a few hours whilst afk on a server to see if anything would stop, freeze or no longer move. The game runs fine as it should, but the idle freeze still happens. I can move the browser to stop it, or press the Minecraft tab in my taskbar to stop it, but I still want the idle freeze to stop entirely. Again, I did not play with optifine at any point of that time. When playing it, i wrote down the time i started testing and when i noticed the freeze, usually it would take a hour of being afk for the game to freeze in game unless I did what I stated above. I have not experienced a freeze hard enough to make me restart my pc yet.
Update 7/29/21
I did play on 1.16.5 vanilla, and it played fine, i did an afk test for a good 2 hours and there were no freezes. I think its definitely a 1.17 / 1.17.1 issue.
From previous Issue made for added detail: https://bugs.mojang.com/browse/MC-233118?filter=-2
I usually use Optifine to go along with a texture pack that I use, but after a download that came out on the 9th of July. I thought it was for 1.17.1 but it wasn't and thus I had used it and the day after I noticed my game begun to freeze when I went Idle / afk. Before this, I was able to afk for hours on a server for hours at a time. But I noticed when chat wasn't flickering, subtitles not moving or torches flickering.
I got rid of the optifine thinking it was the issue, it was not, and never had I had trouble with it before on any other pc. I did uninstall minecraft, mind you I forgot to delete the .minecraft as well. I even allocated more ram to my game. My pc still froze and was able to be fixed by moving the browser entirely. Twice did it really slow my pc down to be restarted. I even used the game without optifine and it froze. Java is up to date, as is my computer. I did the most of what I could do right now,
I even reinstalled Java to see if it was an error itself, my game is the only application doing this, and my computer still plays it fine. But I am unsure what the Idle Freeze thing can be done to be corrected. I haven't found a solution, and I think its a thing on 1.17 / 1.17.1.
Is this still an issue for you in 1.18.2?