Row (vertical) gauge counts mostly when you are making something with shaping. A pattern may call for a certain number of increases or decreases per a certain number of rows to shape an armhole or make a sleeve. If your row gauge is off then your sleeve/armhole will be off as well.
Many patterns will ask you to knit to “X” number of inches before doing something and in that case, row gauge isn’t that critical.
In a scarf it shouldn’t be too much of an issue – you follow the pattern until you are happy with the length or run out of yarn.
You will find that if you are using a yarn and needle size with a close enough gauge to what the pattern calls for you will get the row gauge pretty close as well. It’s when you change needle size to get the gauge with a different yarn that your row gauge gets all wonky.