I already got my answer for ORAS. but what about sun and moon? they are different games, and something might have changed.
It's fine if you turn off your system while using the masuda method.
Source Knowledge