I did this
I used curl inside of a terminal with a large width (300) to download a file while displaying the loading bar. I tested in both macOS Terminal and iTerm.
I expected the following
The spaceship would be cleared after the file was downloaded, replaced by the full progress bar. The spaceship and progress bar will take up one line total. Instead I saw the following:

The progress bar is capped at a maximum length of 256 but the spaceship flies past that limit and isn't cleared.
curl/libcurl version
Default macOS curl:
curl 8.1.2 (x86_64-apple-darwin23.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.55.1
Release-Date: 2023-05-30
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS GSS-API HSTS HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe UnixSockets
I've also tried the homebrew install of curl and saw the same results:
curl 8.4.0 (aarch64-apple-darwin23.0.0) libcurl/8.4.0 (SecureTransport) OpenSSL/3.2.0 zlib/1.2.12 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libssh2/1.11.0 nghttp2/1.58.0 librtmp/2.3 OpenLDAP/2.6.6
Release-Date: 2023-10-11
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
operating system
macOS Sonoma 14.1.1
I did this
I used curl inside of a terminal with a large width (300) to download a file while displaying the loading bar. I tested in both macOS Terminal and iTerm.
I expected the following
The spaceship would be cleared after the file was downloaded, replaced by the full progress bar. The spaceship and progress bar will take up one line total. Instead I saw the following:

The progress bar is capped at a maximum length of 256 but the spaceship flies past that limit and isn't cleared.
curl/libcurl version
Default macOS curl:
I've also tried the homebrew install of curl and saw the same results:
operating system
macOS Sonoma 14.1.1