Maybe you are a little overmedicated on your BP meds. Maybe check your BP a little more often and after exercising. Getting an EKG isn’t a bad idea as suggested above, but a one minute EKG can easily show nothing when there is something, but if it does show something you know right away. Better yet is a stress test if you see a relationship to exercise. If it happens very randomly you could wear a monitor for a day, or few days, to catch what your heart is doing when you feel dizzy, but the stress test is going to monitor your heart and blood pressure.
Take this seriously! No driving when you think it might come on. If it’s happening after exercise don’t drive right after exercising, give yourself time.
Thyroid can also produce a spacey feeling, not so much like you’ll actually pass out usually, except to say that the spacey is often related to blood pressure being very high or low caused by the thyroid being off. If your thyroid is unstable you would want to treat that as an underlying cause for your blood pressure problems. Or, related cause anyway. So, hopefully since you are a BP patient they test your thyroid at least once a year, but no guarantee they are, if not I would get that checked too. Even if your thyroid is off, if it’s that your BP is dropping too low right now, then you still need to adjust your BP meds.