They know it was Pluto because he was a dog and he was wearing pants.
The doglike Goofy character wore pants and that might be what you’re thinking about. Pluto, as far as can be seen in the cartoons I can bring up in a quick internet search, was just a dog and had no clothes.
Pluto NEVER wears pants or trousers of any sort!!!