While we are not tax experts, BCE shares transferred from an unregistered account to a TFSA would be considered a sell transaction and repurchase in the TFSA. However, if there is a capital loss on those shares, the CRA will consider the loss as a superficial loss (a sale and buyback of the same property within 30 days), which prevents investors from claiming the taxable loss at year-end. Investors can only claim that loss if they wait at least 30 days after selling the shares before buying them again in the TFSA.
As for MG shares, if they are transferred from a TFSA to a non-registered account, it does not matter if it is a gain or loss. Investors cannot claim the loss, as the transaction was considered as a sell transaction in the TFSA (tax free) and repurchase in the non-registered account.