EU countries on Wednesday agreed to extend the right for Ukrainians fleeing the war to stay until 2028, but excluded military-age men arriving in the bloc.