The two canons are different. With c. 188.4, the office falls vacant ipso facto if a cleric publicly defects from the faith (leaves the Church).
Per canon 194.2, public defection from the faith results in the loss of office, but the actual loss of office does not happen unless the fact of the public defection has been declared by the proper ecclesiastical authority. The declaration is a condition that must be satisfied for the act that causes the loss of office (public defection from the faith) to have any legal effect.
If you read carefully, you will see that a "vacancy"/"removal" is not the same thing as "enforcement"/"deposed." An office becomes legally "vacant" and the person is "removed," in the eyes of the law (
de jure), when the officeholder publicly defects from the faith. However, he may still
de facto occupy the office. Regardless of the
de facto situation, the seat is legally "vacant" and the person is "removed" the moment he "defects from the faith," and he would have no legitimate authority over anyone.