My reframing admittedly doesn’t actually solve your problem in and of itself. You still need some way to align your not-working days with your vacation days, i.e. to avoid being lazy on days you don’t count as “vacation” in the HR system.
There are ways to reconcile it. One way would be to say that any day on which you don’t work is ipso facto vacation, even if you didn’t declare it as such up front, and thus you should retroactively tell your boss to count it as vacation in the HR system. (But I admit that’s a bit… extreme.) Or, as you suggest, you could instead keep a mental tally of buffer used without officially being vacation, and then work on official-vacation days to reconcile, but that’s a lot of mental bookkeeping work, and probably not worth it for that reason alone.
I don’t actually recommend you do either of the above. But it does highlight your true goal: to align your not-working days with official-vacation days. That is, to not have days on which you don’t work yet aren’t marked as vacation in the HR system. You don’t mind taking a day off, so long as it’s marked appropriately.
That is to say—you’re not actually trying to track the amount you work per se, but rather the extent to which your work aligns with your “official” schedule. What this in turn suggests to me is pretty much what you mentioned in your first post that @clivemeister suggested: that you log not the amount of work, but the amount relative to expectation. Or a simplified version of that: a goal in which you enter 1 as the datapoint if you did at least the full amount of work expected that day (which is automatically true on vacation days), and 0 otherwise.
That said, I get that you also want to track the number of minutes you work. As you point out that @narthur pointed out, to try doing that in the same goal is something of a slippery slope.
In that case, one possible solution would be to try doing both in separate goals! Have one goal with minutes, and one goal with worked-relative-to-expectation. You’d intentionally maintain a decent buffer on the minutes goal, and edgeskate on the relative-to-expecation goal. This would force you not to slack off on non-vacation days (because otherwise you’d derail on the relative-to-expectation goal), but also allow you to take vacation on short notice (because that wouldn’t derail the relative-to-expectation goal, only eat into your buffer on the minutes goal.) You’d add a day’s worth of buffer to the minutes goal every time you accumulate a vacation day in the HR system, but you’d never need to work through a vacation day to make up for a non-vacation day you slacked off on, because your relative-to-expectation goal is already preventing you from slacking off on non-vacation days.
That’s a bit more complicated than is ideal, but I think something more or less like that could work.