Android will pause playback (but not disconnect) after a while in the background, even if battery optimization is turned off

You said “everything”, does that mean that this suggestion didn’t work for you?