The pathing for banking is fixed such that it enters the white portal and then uses the chest which makes this issue occur. The only workaround code-wise without significant effort would be to initiate the entire banking sequence again as if it was at barrows based on whether you have sufficiently missing hp/prayer. Personally I don't think he'll consider the effort worthwhile.