I am sorry you experienced a reaction from your pdoc that made you feel shamed. Listening to why you stopped a medication is important so they can figure out what barriers exist and help you work out a plan that will work for you. I can understand why a pdoc would be concerned about a patient stopping medication without talking to them, because they could have a reaction to stopping the medication of some sort, but doesn't sound like they handled it in a way that worked for you. As others have said, maybe talking to them about how that interaction made you feel would be useful. Also perhaps coming up with an agreement about how you will handle wanting/needing to stop meds in the future?
On a related noted, one time due to a reaction I talked to my pdoc on the phone and we decided to stop the med, but he forgot by the next appointment and thought we agreed to only lower it. So then when I told him at the next appointment I had stopped it he seemed taken aback and asked me a little accusingly why? I explained that we had talked about it and then he was like oh, right we did. Haha. I guess it was a bit of a knee jerk reaction from him.