Since you are asking about grammar and grammaticality, I can only presume you are asking about speech, not writing. Grammar is only a property of speech, of what you can hear. That being the case, the answer to your question is that sure, people do indeed make a natural contraction for both tenses here. It just doesn’t sound the same in both tenses, which is how you can tell one from the other.
Imagine that you had a parent saying this to their child:
[ˈjʊwɚːˈpʰɻɪdiˈlɛjʔˈgɪʔn̩ˈhowmˈlæjəsˈnʌjʔˈkʰɪd]
Because the kid got home pretty late last night. Clear enough, right? That sentence is perfectly grammatical with the contraction as the first word, and its use in the past tense is completely obvious because it sounds different that way — and because it specifies last night. So people really do use this—in speech, where nobody bats an eyelash at routine compressions like these.
An uncontracted you were would have been quite different: [ˈjuw.wɚː]. It would have had a long (close) vowel and two words with a geminated semi-consonant glide [w] separating them, not just one all run together with its vowel shortened up and a lot less of a glide.
The present tense contraction [jʊɹ] doesn’t have a long tense vowel here; it’s more lax. But the past tense contraction [ˈjʊwɚː] would have a little bit longer vowel to start with (although maybe still just as lax) with a semi-consonant glide finishing it, and then a more drawn-out rhotic at the end specifically to distinguish the tense. It would probably even be perceived as having two syllables with the [w] glide between them, which is why I’ve written it that way.
But how you choose to write that is completely up to you: good luck! Whatever you choose won’t affect its grammaticality one tiny bit, not even if you were to write that contraction as Ewwer. We simply don’t have any agreed-upon way to write almost any of the many, many things that we really do say in real-world English speech. This is one of them.
But it surnuff might gitcha talk tabout, doncha know. :)