In blocks_relay_conn_tests, the check that a transaction submitted over RPC is not announced to a block-relay-only peer looks for its txid among the peer's invs. The peer is a P2PTxInvStore, which negotiates wtxidrelay, so an announcement would carry the wtxid. The MiniWallet transaction has a witness, so its txid and wtxid differ, and the check passes whether or not the node announces it.
This checks the wtxid instead. To see the difference, open that connection as outbound-full-relay: the old check still passes, the new one fails.
#35920 also edits blocks_relay_conn_tests; the two do not conflict.
Found while porting these tests to https://github.com/btclib-org/bitcoin-node-tests.
Made with my usual tools: a computer, the Internet and an LLM. The mistakes, as usual, are all mine.