You have to hope the bank rejects it and returns it to IRS, IRS will then issue a refund check and mail it to the address on the return. They may want to let their bank know, just in case its someone elses actual account number and it ends up in the wrong account.
Call the IRS ASAP and hope to catch them before the direct deposit is processed. The next best case scenario is for the bank to reject the deposit and for the IRS to issue a paper refund check. If the bank accepts the deposit or worse, if it gets into someone else' account, it could get more difficult to resolve as the IRS cannot not be held responsible.
Still an AllStar
This is why I am always grateful that I did not go to medical school. Problems with bank account numbers are rarely fatal. But what if you had accidentally prescribed 50 milligrams of fentanyl when it should have been 50 micrograms?