While he always talks tough regardless, I think his actions depend on the nature of the loss, e.g. him being all over the place on Iran, disregarding his own ceasefire for strikes and yet also heading towards a deal that's significantly worse than if he'd done nothing; or similarly all the everything in response to his threats against Greenland.