Just search for "Audi key cover" on Amazon (see link below for an example cover) for a cover that will still let you use the buttons and key easily . I have a cover on an older style Audi flip key and can't remember a time of it opening in my pocket even without the cover on.
https://www.amazon.com/carmonmon-Remote-Keyless-Folding-Carbon/dp/B0793KNTNB/
Another option would be a key wallet. Search for "Audi key wallet" on Amazon (see link below for an example wallet) . Which is basically a zippered pouch that you put the whole key in. You'll have to unzip the pouch to get access to the key to use the buttons and what not as needed.
https://www.amazon.com/Leather-Universal-Holder-Zipper-Wallet/dp/B07RZSJCXG/
Alternatively, you could MacGyver it by using a flat rubber band, duct tape or the like that prevents to key from flipping out even if you press the button.