I've found a solution and it works very well.
This is the code I use
 Function IsWorkingDay(cal As Calendar, dateToCheck As Date) As Boolean
    IsWorkingDay = True
    
    If cal.Years(Year(dateToCheck)).Months(Month(dateToCheck)).Days(Day(dateToCheck)).Working Then
        IsWorkingDay = True
    Else
        IsWorkingDay = False
    End If
Exit Function
It's very simple and it works for the day off in calendar general and if the resource have a vacation.
I don't know if your code is similar @john-project ?!