Banking laws vary from country to country so your actual experience may vary, but in the bank where I work we can only confirm details indicated if we made a certification on your bank details and the party asking is the one to whom we addressed the certification.
For example, if we made a bank certification on April 1, 2022 saying you have $10,000 in your savings account addressed to IRCC, all we can tell them if they call to confirm is “Yes, Abdullahi98 had $10,000 in his account as of April 1.” We will not tell them if you withdrew the amount soon after or if the balance the day before was only $50.