Welcome to Anthrocene.
When a Mac enters normal sleep (lid closed or idle sleep timer triggered), the network hardware powers down. The download pauses.
To understand why downloads stop, it helps to understand what happens during sleep: does mac continue download in sleep
A 2023 M2 MacBook Air, macOS Ventura:
Third-party downloads (browser, torrent client, Steam, etc.)? When a Mac enters normal sleep (lid closed
Just realised that apps don't download while the lid is closed macOS Ventura: Third-party downloads (browser