Specify retain_graph=True not working for RuntimeError: Trying to backward through the graph a second time

I was talking about this post.
Also, the discussion in this issue didn’t help. I am still facing the same thing.