A high SGPT could indicate liver damage which may have been effects from the anesthetics...(?). But if you say the medications are bringing this down, then that is positive.
The vomiting type you describe sounds very much like the kind from an intestinal blockage, and possibly with some bleeding involved (?) Yet you say endoscopy and X rays say all is well....
Yet it doesn't add up to me because this sounds like vomiting of fecal matter possibly, which would indicate some obstruction remaining somewhere along the digestive tract, or very seriously delayed stomach emptying is another thought.
I do think you need to go back to the vet, or even another vet. Your poor dog, I am so sorry he is so unwell like this.
I am not a vet and have no veterinary training. I am just trying to support and help on this site, and I also have no experience of this type of condition.