Driver contracts have never, ever, stopped a car company pulling out of motorsport. It's peanuts compared to the bigger picture. Once a company takes a strategic decision, minor things like driver contracts are just a small line item in a spreadsheet.

Subaru, VW, Suzuki, Mitsubishi etc etc all had to pay out drivers in WRC.

Same in F1 etc etc.