Calling someone a liar is absolutely and always an ad hominem, because it labels their character rather than pursuing their argument.
You can call their words lies and attack those words and their intent, but once you start labelling you are looking to subvert it and attack character by assuming malicious intent.
Which you’re free to assume, but that doesn’t excuse you from the fallacy.