Generally it is not recommended that you do anything potentially short-term deleterious to your credit during the process of seeking a mortgage loan - such as opening a new account, closing old accounts, running up balances, or otherwise applying for any kind of loan (people often get carried away and apply for loans to cover furniture and appliances for the new home they haven't bought yet).
You are usually OK to do things that have at least a short-term positive effect, like paying down debt. But refinancing - which would require applying for a non-home loan - is exactly the sort of hard-pull that can drop your credit rating. It is not generally advised.
The exception to this is would be if you have an especially unusual situation with an existing loan (like your car), that is causing a deal-breaking situation with your home loan. This would for example be having a car payment so high that it violates maximum Debt-to-Income ratios (DTI). If your monthly debt payments are more than 43% of your monthly income, for instance, you will generally be unable to obtain a "qualified mortgage", and over 28-36% will disqualify you from some lenders and low-cost mortgage options.
The reason this is unusual is that you would have to have a bizarrely terrible existing loan, which could somehow be refinanced without increasing your debt while simultaneously providing a monthly savings so dramatic that it would shift your DTI from "unacceptable" to "acceptable". It's possible, but most simple consumer loan refis just don't give that kind of savings.
In most cases you should just "sit tight" and avoid any new loans or refinances while you seek a home purchase. If you want to be sure, you'll need to figure out your DTI ratio (which I recommend anyway) and see where you would be before and after a car refinance. If this would produce a big swing, maybe talk with some mortgage loan professionals who are familiar with lending criteria and ask for their opinion as to whether the change would be worth it.
9 times out of 10, you should wait until after your loan is closed and the home is yours before you try to refinance your car. However I would only warn you that if you think your house + car payment is too much for you to comfortably afford, I'd strongly recommend you seriously reconsider your budget, current car ownership, and house purchasing plans. You might find that after the house purchase the car refi isn't available either, or fine print means it wouldn't provide the savings you thought it would.
Don't buy now hoping an uncertain cost-saving measure will work out later.