I wouldn't expect this to be a spanning tree issue. It sounds a lot more like an ARP problem that can be remedied by MAC Masquerading. When the active unit comes back and you have an outage, check the logs on the standby unit and see if you're rejecting traffic. Also, check ARP tables on your switches and see whose MAC the Virtual Server IPs are mapped to. When I had similar problems, the active unit didn't send out gratuitous ARPs to let everyone know it was again the primary. If it doesn't realize it failed over, it won't necessarily do that.
https://support.f5.com/kb/en-us/solutions/public/7000/200/sol7214.html