Youtube has a default setting to change the video quality on your computer or device when bandwidth is low.
You can change the video quality from low quality video to a higher video quality by going to the settings and playback and change the settings to the video quality you desire.
Other than that there's no way of forcing the higher quality video to play and the lower quality video happens when your download speed on your internet connection drops or the internet line is congested.