Although you register the tensor as a buffer initially, the assignment re-creates self.running_xxx thus storing the computation graph.
I’m not sure if some kind of “recreation guard” would make sense and I rather tend to manually disable the gradient in case there is some kind of special case, where this behavior is needed.