In a comment, you ask whether the half cadence doesn't need a dominant triad in root position. You have one: D F# A.
I 6/4 is a bad analysis of the cadential 6/4. It is not I but V, because this pattern behaves as a (decorated) dominant. The upper parts are appoggiaturas.
In simple terms, I feels like home, and V doesn't. If you were to remove the F# A, extend the G B to the length of a crotchet, and stop the music there, would it feel at all final? No, because of the D in the bass part. This chord still feels like it wants to go somewhere.
Here is a typical example from harmony.org.uk of a good way of writing this progression:
If you are taking a course that requires you to label this progression with I, then you will have to stick it out, but it is misleading and widely criticized.