Are you sure YT Music is set to Autostart? I don’t have that issue myself, but I don’t use the app that much. It wouldn’t be a surprise if there was a weird issue with YT Music though, the WiFi dropping when the mobile data connection is lost has been an issue for over a year.
If you haven’t done it already, change the app to “No restrictions” under Battery Saver then padlock the app on running apps screen (press and hold on the app). You could also try running in performance mode, but none of the apps I use in AA need to be running on the phone first. They only need Autostart to be enabled
I just setup YT music to auto start but I think is still closing after a while, I'll have to check it later.