If you leave the valve set where it is now, nothing will prevent the spa from draining. I am assuming that the pipes to the left of the valve are for the pool and the port in the valve center is for the spa or is the spa on the right? Hard to tell unless you unbury the pipes.
If you had the valve set for Spa off and just used the bypass which is the small pipe, you could put a check valve in that pipe to prevent back flow. In spa mode, there should be no back flow.