A bit late to the party but that's kind of how it works in real world, especially with laws regulating war.
Jokes aside, using cluster munitions is NOT a war crime. Convention on Cluster Munitions is just a treaty that many countries have signed (including Japan in this case) and many have not, for various reasons (lets just say Russia China India Pakistan Ukraine USA both Koreas Poland or Finland).
If story takes place before 2008, then everything is clear, as treaty wasn't even a thing. If it's after, then Japan would be breaching that specific treaty - but it does not make it automatically a war crime. Using weapons banned by a specific treaty (even if you signed it) makes you break that one specific treaty, not Hague/Geneva Conventions.
This was an attack on a standing, uniformed, under banners army, in an open field (so no risk for additional civilian casualties/excessive property damage), that was given a reasonable warning (2 hours to retreat) - even though it wasn't necessary - but instead started mobilizing after receiving a warning, that wasn't surrendering/trying to do so (in some situations still a valid target tbh), that wasn't retreating (still valid target even if they were). Additionally said army was at war (declaration or lack of it doesn't change anything here) with Japan's ally, on territory of said ally, being an imminent threat to a fortified city (basically laying siege/preparing for one), and which had recently commited war crimes themselves at another city (which is kinda irrelevant from legality standpoint tbh).
Hell Japan even ensured there would be no friendly fire. It even fired at the army in the field, not in camp (so any reasoning about excessive force and killing civilian servants/slaves fails here).
Just because you overwhelm your enemy at the incomprehensible level and basically eliminate their whole army in one volley doesn't mean the attack was not lawful.