Two heterostructures consisting of a Bi2Se3 topological insulator substrate and a CrI3 or CrBi2Se4 ferromagnetic insulator thin film have been theoretically studied. The calculated band structure indicates that both heterostructures exhibit the quantum anomalous Hall effect with the splitting of the topological surface state of 19 and 92 meV for CrI3/Bi2Se3 and CrBi2Se4/Bi2Se3, respectively. It has been shown that the band gap is determined primarily by the degree of localization of the wavefunction of the topological state in the ferromagnetic film. This degree of localization depends on the height and width of the interface barrier between the substrate and ferromagnetic material. Both the height and width of the interface barrier in the CrBi2Se4/Bi2Se3 system are similar to the respective characteristics of the van der Waals barrier in bulk Bi2Se3.