The best way I have found is this:
1) Enable Battery ECO mode
2) In the Discharge Settings section, set the On Grid EOD SOC% to 90%, which is the highest threshold it will accept.
3) Set the AC Charge End Battery SOC to like 2% lower - like 88%
4) Set the AC Charge Start Batter SOC to slightly lower - like 87%
If the battery is currently higher than 90%, the inverter will run your loads until it gets to 1% below the On Grid EOD SOC%, so 89%, then the system will switch to grid bypass. You'll see the grid power and load power match exactly at this point with no draw on the battery. If the battery drifts any lower due to internal BMS consumption, etc., then if it ever gets down a few percent it will draw from the grid to keep the battery from slowly discharging more and bring it back to 88% and stop pulling from the grid for charging.
Sounds a little weird, but it should work as you are wanting. If the grid fails the inverter will take over the loads.
The "working modes" doc shared here -
https://diysolarforum.com/posts/1007676/ - is very useful.