"Each player signed to a major league contract at the start of the season shall have his salary determined by multiplying his full-season salary by the number of games scheduled (not adjusting for weather-related postponements or cancellations) divided by 162, minus any advanced salary. In the event of an additional interruption or delay, the salary shall be determined by multiplying his full-season salary by the games played by the player’s club divided by 162."
"So, for player salary, that’s just pure prorated pay based on the games that actually get completed. For an example, if the season were stopped after 10 Cubs games, then Anthony Rizzo’s payment for the year would be his full-season salary ($16.5 million) times 10, divided by 162 = $1.02 million. "
So, while they don't have to pay the full amount if games get cancelled, they do have to pay the full amount if the games are played, but no audience is allowed.
I'm surprised this isn't brought up in the CBA talks. Some teams like the Dodgers get so much TV revenue they're fine, but a lot of teams rely on the gate and they simply can not afford to pay full salaries without attendance.
In that scenario, it's probably better for them to cancel the season than play to empty stadiums.
You would think the players would agree to a reduction in salary based on that, but of course, they won't agree to it.