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.
First they came for the immigrants
And I did not speak out
Because I’m one of the good ones