Do you already have the 5kW grid-tie inverter?
If not, consider a 10kW (or some are 11.5kW) hybrid/all in one.
If so, consider a hybrid that can AC couple with the grid-tie inverter. That would make its power available during backup operation.
In the US, newer inverters have "Rule-21" frequency-watts. If the grid, or a hybrid inverter, raises line frequency, then the grid tie inverter ramps down output power. Other countries may not require that, but some inverters were designed for AC coupling off-grid and support it.
A US model hybrid Sol-Ark supports AC coupling through its "Gen" relay, which allows it to switch off the connection, rather than using frequency shift. Possibly a related brand Deye offers similar operation in your market. That way it doesn't matter whether grid-tie inverter supports frequency-watts or not.
With the SolArk, we would put 5kW of PV panels on its DC coupled PV input. We would put 5kW of AC coupled grid-tie inverter on its Gen input.
SolArk would then have 10kW of PV available for AC loads and battery charging.
As power need decreased, SolArk would ramp down power from DC coupled PV, 5kW down to zero.
For further decrease, it would disconnect 5kW of AC coupled grid-tie inverter and raise DC coupled PV back up to 5kW ... 0kW as needed.
So long as DC coupled PV is equal to or greater than AC coupled PV, you get zero to 10kW of power, continuously variable.
Alternatively, just do what you originally proposed.
5kW of AC coupled grid-tie PV.
5kW of hybrid PV-battery system for backup.
You can let that export 10kW to grid. or, if only allowed 5kW, use CT so hybrid senses what consumption by loads and what export from grid-tie PV. It can then export just enough to sit at 5kW.