Use “Variable loading policy” = on demand.
IPython’s history may keep tensors alive (underscore variables like _, _10). In practice, I almost never have issues caused by that, but maybe your console usage patterns are different. So, disabling IPython may do something (I don’t know how to disable history only).

If you don’t pause or use breakpoints, I don’t see how pycharm would allocate cuda memory.