After #8883, iTerm2 on macOS makes an audible alert sound and issues a toast notification that says Session dotnet #1: 4;0;. It looks like they're interpreting the status sequence as that instead of "start/stop spinner".
Terminal ignores the unknown code.