Ukraine will receive Western support for "years to come", Rishi Sunak said as he warned Vladimir Putin that his strategy of waiting it out is "not going to work".
The Prime Minister said it was one of the Russian president's "great miscalculations" to assume his invasion of Ukraine would fragment allies.
Speaking during a Q&A session at the London Defence Conference in Bush House, Mr Sunak also said there was "consistency" across the G7 in the approach to Beijing.
China's rise represented an "epoch-defining challenge" to the West, he said, but argued the response must not be one of protectionism, with a need to engage with Beijing on a range of issues.
The Prime Minister added: "It is a country that has both the means and the intent to reshape the global order.
"Its behaviour is increasingly authoritarian at home and assertive abroad and in light of that we do need to take the steps to protect ourselves."
While a "particularly robust approach" should be taken in "a limited number of very sensitive sectors" such as semiconductors and quantum, "this is not an excuse for a blanket descent into protectionism," he said.
Mr Sunak warned that such a move would harm collective security.
Asked whether the UK needed an industrial strategy, he said "subsidy races that essentially just shift industrial capacity between allies in some kind of zero-sum competition are not appropriate".
Mr Sunak added: "And we shouldn't be doing things at the expense of each other. That's not improving our collective security."
Quizzed about the US Inflation Reduction Act, the Prime Minister said he welcomed other nations "catching up" with the UK's progress on tackling climate change, but warned again against protectionism.
On Ukraine, Mr Sunak said it was clear the G7 was "united" on continuing to support the war-torn nation against Russian aggression.
He said his message to Mr Putin was: "It's simple. We're not going away."
The UK was leading conversations with allies about longer-term security agreements for Ukraine, Mr Sunak said.
"Making clear to Russia that that support will be coming to Ukraine for years to come" would give Moscow the message that its "waiting-it-out strategy is not going to work", he added.
Mr Sunak said one of the great miscalculations Mr Putin made was that "far from fragmenting allies, it has strengthened them".
"Defence spending is going up everywhere, including in the UK," he said, adding this was "good for European security".
Ukraine had "every chance of success" in its spring counter-offensive with the help of resources and capabilities supplied by the UK and allies, according to the Prime Minister.
Mr Sunak was at the G7 summit in Japan over the weekend, where Ukraine's leader Volodymyr Zelensky addressed leaders and US President Joe Biden gave the approval for western allies to hand over their F-16 fighter jets to Kyiv.