I would just not do it. It is not meant for you to do with metal braces. Doing so may damage your braces and make you have to wear them longer.
askanorthodontist.com:
Chewing the sticky foods will bend the wire. Chewing hard foods will
break the brackets, bands or the wire. You need to remember, we
create a lot of pressure when we chew our food.
Can I chew sugarless gum while I have braces?
The answer is no. A patient should not chew any type of gum while
braces are in place. It does not matter what type of gum you are
using. Gum bends the wire.
dentalhealth.org:
Is there anything I should avoid? Nail biting and chewing your pen or
pencil can damage or break your brace.
Can you eat while wearing Invisalign® aligners? How about chewing gum?
Eating with Invisalign, however, is not a good idea for a couple of
reasons (neither is chewing gum). In fact, having Invisalign®
treatment can be expected to have an effect on the way you eat, at
least to some degree. (Tips for relieving eating pain caused by
Invisalign® treatment.)
Can you chew gum while wearing clear braces?
You'll find that chewing gum with Invisalign® isn't a good idea. The
gum will tend to stick to the aligners' surface. It will be time
consuming and messy to remove.
But if you are desperate:
How to get gum out of your braces? So basically floss and brush, well.
How to Avoid Foods That Will Damage Your Braces:
Try to avoid too much sticky or doughy foods. These will get stuck in
your braces! While things like sliced bread will not necessarily break
any part of the braces, it can collect bacteria if not cleaned out
properly.