Officer/visa officer is technically the most correct because IRCC is a separate office from the consulate/high commission/embassy. They usually just happen to have their physical visa office in a Canadian embassy/consulate.
more often than not, It doesn’t really matter to whom/where the cover letter is addressed to, although “to whom it may concern” is nowadays archaic.