The valence batteries recommend charging at 0.5C, so a maximum charging current of 69A for your 138AH Valence batteries.
Given the solar panel OCV is ~24V, then I assume you're using 5 of the grape solar 300W panels, for 1,500W maximum output. The could result in just over 60A of charging current, but still below what the batteries should be capable of - when new.
My suspicion is that the batteries are in poor shape. Have you done a capacity test? What could be happening is one cell in one of the packs is a runner.
The solution is the same - lower charging current - but I'd guess you should be charging at 30A or less if that's the case.
Regardless, since you're using used batteries, you should try to do some sort of capacity test to confirm the health of the batteries.
Given the inverter's behavior, it's almost certain the batteries are cutting power. These inverters will shut down without warning or fault if the battery is disconnected. Any issue fault will result in a warning or fault, but they depend on the battery for their primary internal power. Page 7 of the manual indicates this, by suggesting a minimum battery capacity of 200AH for the 24V model.
So you're already under the battery capacity minimum for the inverter, and on top of that they are used batteries and may even be half what the inverter requires.
Secondly, I'm concerned about the AC power draw. A 30A breaker at 220VAC is 6.6kW - well over twice what your inverter can handle, and more than what your transformer can handle. While the batteries, when new, could provide 3kW of power output, you should consider using an AC breaker that will protect both the loads and the power source.
I don't think that's the source of your problem, but if you size all the protections in the system conservatively then you'll not only protect your equipment and investment, but you'll find the source of a fault much more quickly.
At any rate, the suggestions I make are:
1. Reduce charging current even further, to 30A. If it works fine, you can increase it, but since you don't know what the actual limit is, and it will vary with temperature and charge, then being conservative with this number will reduce your problems.
2. Check the capacity and internal resistance of your batteries. This exact scenario could be caused by low capacity cells with high resistance even when the charge current is low, so the first recommendation might not solve all the cutoffs, and you may be left scratching your head when it does occur, even if it's no longer common after #1.
3. Increase your battery capacity to the inverter's recommended minimum of 200AH (actual measured capacity, not just what the batteries claim when new). While it's not cheap, adding 100AH of 24V batteries in parallel with what you've got will resolve several possible reasons this is happening.
4. Use more conservative protection devices (fuses/breakers/etc), including on the battery, so you can more quickly determine the source of a fault.