Dear student,
Here both assertion and reason are true. But the Reason is not the current explanation of the assertion. The reason is just illustrating that during electrolysis, there is a conversion of a liquid state to a gaseous state ( physical change). It fails to explain what type of chemical change is observed. But the statement is true with respect to the products formed and changes occurring in the physical state. The assertion needs an explanation for both types of changes - chemical and physical which is not well given by the reason.
Regards.