We visited Morocco in January 2019, and didn’t go to Casablanca, but started and ended in Marrakech. We did stay at the wonderful Dar Kawa riad, in the old Medina, a place designed by Belgian designer Valerie Barkowski. There wasn’t a reason for the subject to ever come up during our stays, and I might be wrong, but my sense is she/they wouldn’t have any issue with gay male guests.
Anyway, they arranged for our guided tours of the city, and on one, our guide accompanied us to the YSL complex in the “new” part of the city. He hailed a cab, and the 3 of us headed there. We didn’t venture inside the museum, but had lunch at the restaurant at the gardens, and strolled the exotic gardens afterwards. Guides don’t join their tourist clients for lunch - they eat on their own, in a separate place, often among other guides - we asked if he’d join us and that’s just how it’s done.
You could easily take a taxi there, or even walk, if you’re staying nearby.
We flew between Marrakech and Fes - Irish Ryanair operates flights! Maybe that’s an option, although cars and trains operate, too. Graham Nash’s Marrakech Express song was written after he took the train between Casablanca and Marrakech, and bored with sitting with blue-haired American women in 1st Class in the 1960’s he wandered down to the crowded lower-fare car and found it more intriguing.
Before we headed to a desert tour with a separate company, which provided car transfer service as part of the overall tour, in Marrakech we did a cooking class with Souk Cuisine, which included a market (souk) tour led by Belgian Gemma, who then turned over the cooking instruction to her Moroccan experts. What a lunch we all made!