[GetTransaction] remove unneeded cs_main lock acquire
Summary: Backport of core#22609.
Test Plan:
With Debug and Clang:
ninja all check-all
Run the TSAN build.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D12210