I developed chronic diarrhea a few months after the birth of my youngest child, many years ago. Testing was inconclusive, due to severe spasms (years later, another GI doc said it was a motility issue--somehow food moves through much too quickly, maybe due to spasms). I also may have mild CP, so that could be a factor.
Long story short: the GI doctor put me on Elavil (amitriptyline), and it has a side effect of being very drying. I took 50 mg at night for years (this was a long process). Still have occasional issues even now, more than 20 years later, but much improved. It's an old med, and I don't know if it's still used for this, but it sure helped.
Years later, I developed gastritis after surgery for a ruptured appendix. I also had to be on what he called a 'careful' diet: Plain cooked meats, cooked carrots, mashed potatoes, toast or crackers, applesauce, bananas, etc.. It was interesting to find that I had to go on almost the identical diet! Again, thankfully, it helped, though. I'm better, but still have my days of dealing with this, but not too often.
Wish you the best!
Have you seen a GI doctor? He/she may really be helpful as far as testing and evaluating what exactly is going on.