That is not how marginal tax rates work. Each income band is taxed at the rate for that band. It’s why it’s called “marginal” - because the rate change happens at the margin between brackets.
You are taxed 0% on your first £12571. You are taxed 20% on your next £37669, or, £7359.80 on £50270 of income. If you then earned one more pound, or £50271, you would owe £0.40 (40%) on that one additional pound only, for a total of £7361.20. There is no income stage where earning more money has you taking home less.