London was relatively competitive when the exchange rate was above $1.5 for a pound. Note that it was approaching $2 for most of the 2000s until the financial crisis.
You could make bank easily in London as a contractor (very low taxes), maybe more than in the Silicon Valley.
Then over the last decade the exchange rate plumetted and the cost of rent/home doubled, while salaries and daily rates didn't move. Why they didn't move? There's too much talent and not a lot of companies with big pockets.
Most of the FAANG and assimilated that drove up salaries in the valley have no presence in London.