Once a tax return has been filed the direct deposit information cannot be changed.
The IRS will send the stimulus payment to the bank of record from the 2019 federal tax return. If the account is closed the IRS will mail the stimulus check to the address on the 2019 tax return.