I don't have an HSA, so not sure if this is helpful: But I have an FSA. And I know there are reasons I shouldn't do this, but I only record my net pay, so FSA contributions aren't part of it. Then when I have an FSA reimbursable expense, I record the expense to a budget category I call "Reimbursable." I don't budget for these expenses, so I let the category go into the red. Once I am reimbursed I post the "income" to that account. This is lacking because at the end of the year, it's like the medical expenses and the corresponding income never existed, so I have a skewed picture of actual spend.
Essentially from an accounting perspective, it's all on the income statement and never on the balance sheet... I don't have an account for it at all, on or off budget.
I also have a dependent care fsa, which I treat differently. I budget monthly for preschool tuition that is paid twice yearly, then when I get reimbursed for it, it just comes in as regular income, and I typically throw it into some savings vehicle. Like the medical FSA, there is no separate account for the funds as they taken from my paycheck. I just call them into existence when I'm reimbursed.
I probably should treat the medical fsa the same way I do the dependent care FSA.
Maybe going forward.
But I also don't keep non-spending accounts (401K, ROth, other investments) in YNAB, for the most part. Pretty much just the checking, short term savings, and cards we utilize (and pay off immediately.)