Most probably, this is due to vgg16 having in-place ReLU activations. You can deactivate in-place operations in generic modules with
leaf_nodes = []
for  module in model.modules():
  if not len(list(module.children()):
    if hasattr(module, "inplace") and module.inplace:
      module.inplace = False
    leaf_nodes.append(module)