While your vet/trainer might have "ruled out pain issues" unless x-rays were taken, and other diagnostic work done, you don't know that pain isn't a factor.
Too many times, the tests needed are cost prohibitive, or worse? Can't be done locally. But you can not rule out arthritis, bone spurs, broken/cracked bones, or what have you without them.
And could be peritonitis too, horses will hide a tremendous amount of pain, until it is unbearable. And could also be an abscess deep in muscle tissue? Could be dental issues, or even broken bones in jaw.
Without intensive tests? Pain could be the root cause of this.
Conversely? Since none of us can see you or this horse, it is also impossible to tell if this horse is merely having you on, by acting up. Depending on your skills, or the individual toughness of the horse? He could be perfectly fine, and it is basically you that is the problem here, either in a mismatch of you and the horse, or that you are too timid a handler/rider to come out on top.
There are some horses that are extremely tough, not so much in terms of meanness, but in terms of they are determined to come out on top, and it takes a really strong mindset to overcome that. A "kinder, gentler" trainer/rider/handler may not be able to handle the horse.
Case in point? We had, at Saddlebred training barn I worked at, an extremely talented gaited horse, who was tough as nails, stubborn, and very willful. He went, after much wasted time, to a trainer known to take nothing from a horse. He got upper hand on him, and won consistently after that, because the horse knew he could not best him.
I would do more vet tests, to see what is going on if you can, to make sure pain isn't a factor, without them? You won't be able to rule it out.
Horses make me a better person.