There is actually some evidence that the valsalva manoeuvre can help by reducing the stress faced by the blood vessel walls and lower cerebrovascular transmural pressure, which could lower exertion headaches. If you or anyone doesn’t know, the valsalva manoeuvre is where you close your epiglottis and exert a pressure against it when you lift (commonly heard as grunting, though you don’t actually have to grunt).
Its a natural reaction when lifting very heavy or close to failure. One of my lecturers said he suffered chronic exertion headaches, and valsalva manoeuvres helped to a degree. He also relied on other techniques that would lower the blood pressure response.
There are a few but they tend to compromise gains in the gym, but carefully managed, you should be fine to continue using some of the following techniques: avoiding failure (but you could try to accelerate the weight as much as possible to maximise MU recruitment, which takes a hit when using sub failure), avoiding high reps (yes, its actually better to use heavier weight and train in the 1-5 rep range), use more unilateral exercises, you could used eccentrically biased methods (e.g. lift with two arms, lower with one.
Obviously does not work with all exercises) and stopping between reps helps (so like rest pause but not hitting failure, kind of like clusters I guess). Some people are just predispositioned to it, but these techniques can help, may be worth a shot. TIme off would’t hurt though, good luck!