Like most ambiguities of this kind, we know what is really meant by looking at the context. That means not only the rest of the sentence but possibly the rest of the paragraph (if written) or the general topic of the text or the conversation.
Because seeing and dressing are totally different kinds of things, it would be very strange to confuse them in real life. Also, because the grammatical persons involved are different (2nd singular vs. 3rd singular), in actual discourse it would be very difficult to find a situation where one could mistake one for the other.
If you are having a conversation with another person, and I ask "¿Viste un traje nuevo?", that can in principle mean 1) "Did you see a new suit?" or 2) "Is he wearing a new suit?", but there are not many conceivable real-life situations where it could be interpreted ambiguously. If I haven't mentioned a third person before and we're talking about going shopping for clothes, then it must be option 1; if I'm pointing at a third person who is present somewhere close to us, then it must be option 2. If neither of those are true, then the sentence is ambiguous, but in that case it makes no sense to begin with.
I don't recall ever finding this particular ambiguity problematic. That is, I've never had a problem differentiating viste from vestir with viste from ver. It simply doesn't happen in real life. It can only happen in isolated sentences that are constructed (as a sort of exercise) specifically to be ambiguous.