The loosening of a strict dress code comes as Japanese offices cut reliance on air conditioning due to high energy costs linked to the Middle East war.