If you cancel the connection to a server right as resource pack downloading starts, the pack will continue to download and be usable until you join and leave a singleplayer or multiplayer world (or close the game).
This wasn't the case in 1.20.2 and earlier, as resource pack loading was changed with 1.20.3.
Additionally, one side effect I noticed is that if you try joining a singleplayer world while the pack is nearly done downloading (~90%+), the game completely freezes on the Mojang loading screen, requiring you to kill the process via task manager or similar.
can confirm for 1.20.3 and 1.20.2