Hi yarishb,
Welcome to the Apple Community.
Am no expert in this field, yet your post surely deserves a response.
Wondering which iPhone/MacBook models, and which iOS/MacOS versions you use.
Wondering too, if Apple support's articles can help troubleshoot / find the cause:
Eg:
Scroll to: "Listen and control audio with your AirPods Max" in the article (link below)
Connect and use your AirPods Max - Apple Support
_______________________________________________________________________
Re: Nothing has helped:
You have tried some very good steps! Thank you for letting us know.
Maybe try:
Click the Apple icon in the top menu bar > About this Mac > System Preferences > Sound > output, where you can control / experiment with / the output volume.
____________________________________________________
Set up AirPods Max with your Mac and other Bluetooth devices - Apple Support
Eg: says:
"If sound still plays from your Mac speakers, click either the Bluetooth menu or the volume control in the menu bar and make sure that your AirPods Max are selected as the output device".
else:
You might want to try a different "mode" to see if that works:
Eg: See if the audio plays through the AirPods Max in airport mode
or
try switching modes:
AirPods Pro and AirPods Max Active Noise Cancellation and Transparency mode - Apple Support
What to do: If sound quality is reduced when using Bluetooth headphones with your Mac - Apple Support
Eg: says:
"Quit any apps that use the microphone on your Bluetooth headphones such as video conferencing or chat apps.
Make sure that System Settings (or System Preferences) isn't open and showing your Sound settings".
______________________________________________________________________
Else:
Could another open app (eg Game with audio) be "over-riding" the earphones audio
Hope this helps :-)