Flaps settings
Generally speaking ... (I'm not qualified B777 ... by far).
There is a flaps setting called "approach flaps setting" that allows a N-1 go-around with 2+ % climb gradient.
That "approach" flaps setting causes much less drag than the "full landing" flaps setting while still providing a lot of lift (81% - and generally more - of the full flaps setting).
That approcach flaps setting is generally very close to the maximum take-of flaps setting.
So, reducing from landing flaps to approach flaps is a normal move in case of thrust problems. I would say : a normal, immediate move. The stall margin is reduced by less than 10%. Second immediate move : lower the nose, keep the speed.
In short : Know your aircraft, fly your aircraft.
Whatever the aircraft type.