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