It’s fine and good to wash cast iron - particularly if you had something corrosive in there. Don’t do it in the dishwasher (change in heat can be bad for it - same reason not to machine wash kitchen knives).
People who say washing your pan will remove the seasoning have not properly seasoned their pans or see food residue washing out and think it is the polymerized oils bonded to the metal that are washing out. If that’s the case, they are washing way too aggressively.
There used to be some truth to the advise of not washing cast iron because those old-fashioned soaps had lye that could break down the seasoning. So I guess if you like to use boutique soaps you should be mindful if they contain lye. But if you’re just using dawn dish soap like probably 90% of everybody, go to town, you’re not going to remove seasoning with dish soap