Haven’t done this, but I don’t see how you cannot be allowed to walk through and enjoy much of the gardens if you have access to either one of the Trianons - Grand or Petit.
I also suggest you download the Chateau de Versailles official (and free) app. On the app, I see that there are separate tix for the Musical Fountains and the Musical Garden, each at 15 Euros, that you can purchase on line. But I don’t think you need those. (The Musical Gardens and the Musical Fountans shows just run some of the time.)
The official app is great as it has maps and room by room discussions/audio tours throughout the Chateau and Gardens, such as each room in the Louis XIV Rooms, the State Rooms, the Petit Trianon, Grand Trianon, Gardens and more. Audio Tours run 30 minutes to 2 hours. I count 27 audio tours, 4 of which are for “kids” or “children.” More than you can possibly do in a single day.
You can and should spend time familiarizing yourself with the Chateau and garden complex - and the app - in advance of your visit.
For me, Versailles was a once in a lifetime experience … as in one and done. When we visited in 2023, it may have been our least favorite of 30 planned days in France, due to crowds and heat. Still, I am glad we went. I still have the app on my phone, which updates with current info.