Imodium sometimes works and sometimes “doesn’t”?

I take Imodium way too often. I was having consistently loose stools in the spring with a particularly long flare up and became reliant on Imodium. It’s like 90% mental for me. I have a developed anxiety around needing to go when I’m anywhere but my own home. Even at home I feel like all I think about is “am I going to have a bowel movement?” “Is it going to be normal?” “Will I have to even go more than once?!” This causes me to take Imodium a lot preemptively or just after going once and I’ve deemed it’s anything softer than type 2 on the Bristol stool chart.

However, sometimes Imodium ends up making me very constipated (which I’ll admit sometimes I prefer because I just hate using the bathroom), and I won’t go for like 4-5 days. Other times, I feel like I can take 2 and will still have to go the next day, and it’s even softer. Then that makes me worry something is more wrong since I took it and it didn’t constipate me. For example, I took it yesterday because right when I got to work I had to go and it was a little softer. I didn’t want to go again so I took 2. Then today I’ve already had to go twice. Not D but softer and just feels eh down there. I’m debating taking more. Why does it constipate me sometimes and other times not?