Preventing the home battery discharge with IO, especially during the ad-hoc, smart charge slots can be tricky with the standard setting that are presented in the portal. Prior to being on IO, we had GO and that was easy because the cheap slot and the car charging was always the same so it was a case of setting the home battery to charge at the same time.
However since moving to IO, I had the same dilemma. Generally the slots tend to be 23:30-05:30 so one can set the home battery to charge in those times but if Octopus throw in a slot outside that, even a 30 minute slot at 7kW can take a lot from the battery.
The solution for me has been to use Home Assistant and set up an automation triggered by the car charging which sets an action to pause the discharge. HA is a whole new level of geekery though which will need some research if you haven't ventured into that.