Because you did not say you have one, I am thinking you do not use a security bypass cable?
This part of the topic has been sort of a frustrating point for me. In this and other threads it has been said numerous times by reliable sources that... #1: You can not clear any codes without a security gateway bypass cable. And #2: Once a code like this has occurred, the only way for it to be cleared is a trip to the dealer to fix the issue that caused it.
But the frustrating part is that you and others have posted real life experience that seems to go against points one and two.
I have read a few people say that they have cleared seeming major errors and either not had them come back or if they did come back after some miles, the mileage countdown has been reset. As far as clearing codes in general, many have posted that they have done it without a security gateway bypass. And Banks Engineering insists that they do it on the 2019-2021 Rams every day.
I can't say what is accurate as fortunately I have no real-world experience with this that I can be certain about thus far. But it sure is frustrating trying to ascertain what the viable options might be if it did happen!