The answer is more or less "FIFA takes the action it feels like taking". We can look at examples and speculate, but that's about it.
..with that said:
This has already happened, in a lower status international tournament, the 1998 Tiger Cup. Quotes from Wikipedia:
This tournament was marred by an unsportsmanlike match between Thailand and Indonesia during the group stage. Both teams were already assured of qualification for the semi-finals, but both teams also knew that the winners of the game would face hosts Vietnam in the semi-finals, while the losing team would face surprise group winners Singapore, who were perceived to be easier opposition, and would also avoid the inconvenience of moving the team's training base from Ho Chi Minh City to Hanoi for the semi-finals. The first half saw little action, with both teams barely making any attempt to score. During the second half both teams managed to score, resulting in a 2–2 score after 90 minutes. During injury time, despite two Thai defenders attempting to stop him, Indonesian defender Mursyid Effendi deliberately scored an own goal, handing Thailand a 3–2 victory.
FIFA took action against both teams
FIFA fined both teams $40,000 for "violating the spirit of the game", while Mursyid was banned from domestic football for one year and international football for life. In the semi-finals, Thailand lost to Vietnam, and Indonesia lost to Singapore. In the final, the title was to elude the hosts, as they went down 1–0 to unfancied Singapore in one of the competition's biggest shocks to date
Another answer has already quoted a lot of the Fifa disciplinary code and the Regulations for the 2018.
It turns out they have fairly wide and vaguely defined authority to enforce the "spirit of fair play".
The Fifa code of conduct describes not "playing to win" as "cheating" ones opponents and "deceiving" the crowd.
Fifa could do the same thing as in 1996, or harser, it's up to them. The most important thing to understand is that there's a huge amount of room for Fifa's discretion.
However, I think it's pretty clear that action would be taken against an extremely obvious attempt to lose.
But wait there's more.
A similar thing has happened at World Cup, in 1982.
The Disgrace of Gijón was a 1982 FIFA World Cup football match played between West Germany and Austria at the El Molinón stadium in Gijón, Spain, on 25 June 1982. The match was the last game of the first-round Group 2, with Algeria and Chile having played the day before. With the outcome of that match already decided, a win by one or two goals for West Germany would result in both them and Austria qualifying at the expense of Algeria, who had defeated West Germany in the first game. West Germany took the lead after 10 minutes, after which the remaining 80 minutes was characterized by few serious attempts by either side to score.
But this time Fifa took no action
Both sides were accused of match-fixing, although FIFA ruled that neither team broke any rules.
In my opinion this is a less blatant case of unsporting behaviour (no deliberate own goals here this time). Clearly there is a threshold. I would be interested to know if Fifa's sanction use or decision making is different for World Cups than it is for smaller tournaments, but I have no idea. It certainly means that it gets a bigger Wikipedia page. It's also worth pointing out that 1982 was 36 years ago, football was different and Fifa was different.
Once again, the most important thing to understand is it's basically up to Fifa.
Interesting fact: This match is the reason why the final pair of group matches in international tournaments always start at the same time.