Here is an illustration of a mathematical perspective, when converting chemical formulas’ ratios into whole numbers.
Obtaining whole number integers with equations that have fractional coefficients.
The Simple Rule: Multiply the whole equation by the GCF* for all of the coefficients of the formula.

What gets affected?
All coefficients are affected and this excludes the sub or superscripts too. This means both the coefficients within the reactants and products of the chemical formula are affected.
Explanation
A chemical formula is a ratio of atoms (in my perspective, it is a qualitative formula of data, using a ratio form of measurement). The ratio of atoms in both the reactants and the products must equal, else the whole chemical equation would be considered a different species of compound. #Empirical-Formula

SideNote(s)
The subscripts and the superscripts are not changed when converting a chemical formula’s numbers with ratios, into a chemical formula’s numbers into whole numbers.

* The Greatest Common Denominator, GCF()