Confined transverse electric phonon polaritons in hexagonal boron nitrides