@TheUnnamed22
I think I do. Right here:
QNet.copy_weights([agent.l1, agent.l2, agent.l3, agent.l4, agent.l5],
                          [target_agent.l1, target_agent.l2, target_agent.l3, target_agent.l4, agent.l5])

(Here is the used function)
@staticmethod
 def copy_weights(origin: [], target: []):
     for origin_layer, target_layer in zip(origin, target):
         target_layer.weight = nn.Parameter(origin_layer.weight.clone())

I even made an if statement to be sure:
weights = q.target_net.l1.weight
QNet.copy_weights([agent.l1, agent.l2, agent.l3, agent.l4, agent.l5],
                          [target_agent.l1, target_agent.l2, target_agent.l3, target_agent.l4, agent.l5])
if not t.all(t.eq(q.target_net.l1.weight, weights)).item():
   print("works fine")

But I have to say that in the previous code, I didn’t copy the last (fifth) layer. So your statement was technically true.