test: add p2p_lock acquires in p2p_leak_tx.py
Summary:
This is a backport of core#20126 [2/2]
https://github.com/bitcoin/bitcoin/pull/20126/commits/5b77f8098de537898151ab116d0e547fd6ff9466
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D10462