Good for you starting back into violin after a long break. And it is nice to see you getting around the forum! 🙂 You might be right, perhaps you were enjoying the melodies when playing songs and etudes and were, therefore, more relaxed. Also, if they were familiar tunes, your ears might have tuned in a little better than on a scale. You might try singing along with the pitch as you play, sometimes internalizing the pitch helps a lot with intonation. Maybe switch back and forth between singing, then playing a few times.
Suzanne from Violin Tutor Pro