It just takes "a few"* minutes for the (legacy) pathfinder to update itself on Flooded Valley with that modoption set, and any path calculated before the waterlevel change is completely processed will be "funny".
* around 7.5 in fact (global Spring.AdjustHeightMap calls like the one that gets triggered via unit_terraform.lua :: gadget:Initialize --> RaiseWater are expensive), a time index of 5:20 as shown on your screenshot is still deep within the funny zone so you must wait longer if you want your units to not be confused