How would they know how you voted?
***
IIRC, you ask for a Republican ballot, your ballot in the general will show only Republicans.
We have electronic ballots now, so I don’t think that is done anymore.
In Texas you can vote in either primary but you’ll only receive one ballot for the party you chose. In the General you can vote either party as you choose. Years ago I had to vote in the Democrat primary in an effort to help a friend of mine who was running for Sheriff. There was two running for office in the democrat primary and I and many others voted for the one that we could easily beat and we did in the general. He is now into his third term as Sheriff.