What is the safe way to isolate a leaking tank?
Shut the cold inlet valve where that line enters the tank, and then take the heat away from it: the gas control on a gas unit, the breaker on an electric one. Nothing gets drained while the tank is full and hot, and nothing gets reached across standing water.
Old valves seize, and that is common enough to plan for. If it will not turn, use the main shut-off where the water service enters the building instead and tell anyone else who will lose water, which in a multi-household building may be several people.
Once it is isolated, leave it. A tank that ran dry, or a burner and controls that have been wet, want a licensed plumber's eyes before anything is relit or re-energized. Replacing the heater and its connections is plumbing work and not part of the cleanup.
Is the water from a water heater clean?
It leaves the tank as the same water that comes out of a tap, but it does not stay that way. Once it has crossed a floor it carries whatever was on that floor, and tank water also brings sediment and rust with it, which is why it stains.
That changes what gets saved. Hard, non-porous surfaces clean up and dry. Carpet pad, cardboard, pressed-board shelving and upholstered items that sat in it are more likely to be removed than dried, and the decision is about how long they were wet as much as what they are.
If the water reached a floor drain and anything came back up, the job is reclassified on the spot and handled as contaminated, with containment and removal rather than drying. That is a different scope and you are told at the time, not at the end.
What decides the cost of a water heater cleanup here?
How long the tank ran, how far the water traveled, whether it reached finished rooms, how much storage and material has to come out, and how awkward the space is to work in. No figures appear on this site, and the scope and price are explained and approved before work starts.
A tank in a bare utility space caught quickly is the small end of the work: extract, pull the wet cardboard, open the wall base if it wicked, dry and leave. A tank that ran into a finished room, under a cabinet run or down a stair is at the other end, where removal and a longer drying run drive the total.
What follows is separate. Replacing the heater is a plumber's job and priced by them, and any rebuilding of what was removed is separate again. If the cleanup will disturb old flooring or pipe wrap, say so early so it can be looked at before anything is cut.
Why did the damage end up in the next room?
Because water goes where the floor lets it, not where the walls suggest. A heater closet usually has a threshold, a gap under the door and an unsealed floor penetration for the supply lines, and all three are routes out into whatever is next door.
The quiet route is under the finish. Water that gets below a vinyl plank or sheet floor spreads across the subfloor and can show up as a soft patch a room away, with nothing visible between the two.
That is why the meter work goes well past the wet edge, including the far side of shared walls and the ceiling of any space below. Where it has traveled downward, the ceiling work is covered under ceiling and drywall water damage.
Can the heater keep running once the leak has stopped?
That is not a question answered here. A heater that has leaked, run dry or had its controls wet is for a licensed plumber to assess, and this work stops at the cleanup and the drying rather than at the appliance.
What can be said is what the record shows: where the water came from, how long it looks to have been going on, and what it reached. Rust patterns and the state of the material behind the tank often say more about duration than anyone's memory does.
Meanwhile the space is dried on readings so that whatever replaces the tank is set on dry material. Putting a new heater onto a wet floor in a closet with wet drywall behind it stores the next problem up rather than solving this one.