This issue affects rejoining Tubnet, Hypixel, MCC Island, and any server using a pack that may use a custom atlas, though those three are among some of the most prevalent. Hence, if you join a server that uses custom server resource packs such as Tubnet and leave, and then join again, you will notice severe FPS lag. This issue also affects singleplayer when reloading such resource packs on a Mac M1/M2 machine, as pointed out by @Caden Kriese.
1. Join Tubnet or MCC Island (Tubnet lets you join for free)
2. Leave Tubnet and join again
Results: Severe FPS lag on the second login.
Expected results: No additional FPS lag no matter when you join.
Note: Joining either of those servers for the first time, and then logging off to join another server using a resource pack also causes lag. For example, you get lag if you leave Tubnet to join MCC Island and vice versa.