It takes more than just throwing money at the problem to win. Otherwise, Red Bull (paying for two teams in full) and Ferrari would be doing a lot better right now.
Ferrari's last driver's championship win was 2007, and last constructors championship win was 2008. If simply outspending their competitors by 5% would make all the difference, I think they would have tried it by now (and infact, if you look at previous years, they have, and failed)
[0] https://www.essentiallysports.com/what-are-the-budgets-for-a...
The team might spent untold hundreds of millions (of money they have earned) but the parent Mercedes company spend thirty million a year.
For Mercedes this is excellent value for money, equivalent to a billion or so in paid advertising time on television.
Contrast this situation with teams at the back of the grid: no revenue from supplying engines, expenses for getting engines, poor sponsorship money, no income from a parent manufacturer. Oh, and little in the way of prize money. They do get some sponsorship money from their drivers though, either because they are in a Mercedes/Ferrari/Red Bull 'academy' or because the pay driver comes with sponsorship from his wealthy father or country.