The magic phrase is “envelope-follower”,
e.g. the second block of Nyquist-code here … https://forum.audacityteam.org/t/import-list-of-frequencies-and-levels/16343/5
Audacity has an effect called AutoDuck which does the exact opposite of what you want.
You could add, (generate), a white-noise track, AutoDuck that noise track using the music, then AutoDuck the binaural-beats using the AutoDucked white-noise track , ( then discard the noise track ).