When a UFC fight is ruled no contest or a technical draw, most bets will be void.
The only exceptions are bets that have already been decided, like betting a fighter to win in Round 1 if the fight ends in Round 3.
From DraftKings' House Rules: "In declaration of a “No Contest” or “Technical Draw,” all bets will be void and wagers will be refunded, with the exception of markets where the outcome has already been determined."
A no contest usually happens as the result of an accidental injury.
Kevin Holland vs. Kyle Daukaus in October 2021 resulted in a no contest after an accidental headbutt knocked Holland out.
Daukaus initially won by submission, but upon review, officials determined the headbutt caused Holland to go down.
Here is the definition of each, from the Unified Rules of MMA:
No Contest: "When a contest is prematurely stopped due to accidental injury and a sufficient amount of time has not been completed to render a decision via the score cards."
Technical Draw: "When an injury is sustained during competition as a
result of an intentional foul and the bout is allowed to continue, then later
the injury requires stoppage from either a legal or illegal strike to the
affected area after 1/2 of the scheduled rounds, plus one (1) second has
been completed, if the injured contestant is even or behind on the score
cards at the time of stoppage, the decision is a Technical Draw."