“the solenoid MUST be in vertical position” — I have never heard of this as a requirement. It’s true that solenoids usually are in vertical position but I don’t think this is a requirement for it to work.
The short answer is that OpenSprinkler does NOT record the position of latching valve because there is no way for it to know. But it does close all valves at reboot. Typically, when there is no feedback from the valve to tell which position it’s at, the solution is to periodically refresh the valves according to what positions they should be at currently. I don’t think the firmware currently does that, but it can be easily added. This is the same question as how do you tell what positions ‘remote valves’ are at, when there is no feedback mechanism — the solution is to just periodically refresh the status of them to make sure they are in sync with what the software assumes them to be.
If your valves are all open at reboot, then you should check the polarity: the COM (common) wire should be connected to the positive wire of each valve, and individual zone wire should be the negative wire of each valve.