as I understand it
you have receive money from the same (or colluding) counterparty two times (A and B),
they suspect you're the same person and are skilled enough to create a custom transaction B to test their theory,
then when you confirm receipt of the funds out of band
they then know you also control subaddress A.
so its a little more interactive than you said
but yeah, keeping separate wallets for separate uses is a good idea ❤️