Steps to Reproduce:
Join a server that requires a custom resource pack.
As soon as the "Downloading Resource Pack" screen appears, click the "Cancel" button.
Observe the textures on the Title Screen.
Join a different server or a single-player world.
Observed Results:
The resource pack from the canceled server connection remains active and visible on the title screen and other worlds, even though the player is no longer connecting to that server.
Expected Results:
The resource pack should be completely discarded or unloaded if the connection is canceled, returning the game to its previous resource pack state.
I believe they are tracking this issue here:
MC-267204