Wired either direction, I think it will successfully open circuit while charging because voltage difference is low. Discharging direction, at least if there is a short, I think it is a problem.
ChatGPT said protects regardless of direction of current flow, charging or charging.
The polarized breaker interrupts current when contacts open and uses a magnet to push arc, but that only works for one direction of current flow. Low voltage or current, probably works either way. Higher voltage and current it is likely to fail with current going the wrong direction.
If wired so correct direction is when battery discharges into inverter, if there is a short at the inverter, breaker trips and has to interrupt full battery voltage and short-circuit current. If within ratings, that should be successful.
Inverter charging battery, the current isn't like to be enough to trip, unless wrong value. If it does, or if you open the breaker, it carries at most rated charging current, and voltage across breaker is Vcharger - Vbattery, not very much. So it should work even though current flows the "wrong" way.
A short of Bat+ to Bat- between battery and breaker, then breaker sees full Vcharger, probably doesn't trip anyway because current from charger isn't too high but if you manually open it, then full Vcharger and breaker may burn. However, unprotected cable from battery Bat+ and Bat- is going to burn regardless of breaker. So put breaker or fuse close enough to battery that there is no opportunity for cables to short (and don't drop a wrench on battery terminals; keep them covered.)
The biggest problem seems to be polarized breakers for multiple PV strings in parallel. A short could be made in wires on either side of breaker, and in the wrong direction of current flow, breaker is likely to burn.