Not back then it wouldn't be, though, if we take the veracity of the story at face value. The inclusion of perfidy (bad-faith deception, such as dressing up as a civilian or opposing force) as a banned act within the Geneva Conventions was only adopted in 1977, under articles 37 and 39 of Additional Protocol I.
Edit: And even today, Article 39 exempts naval engagements specifically from that provision when it comes to flying the wrong colors with intent to deceive.
To be fair: A lot of things that are war crimes today were declared as such specifically because of WWI. Meaning that they weren't war crimes when they were committed during the war. Specifically chemical agents (mustard gas and friends) had never been seen before, so there obviously was no treaty banning their use until after the fact.