§1. The power of a vicar general and an episcopal vicar ceases at the expiration of the time of the mandate, by resignation, by removal made known to them by the diocesan bishop, without prejudice to cann. 406 and 409, and at the vacancy of the episcopal see.
§2. When the function of the diocesan bishop is suspended, the power of a vicar general and an episcopal vicar is suspended also unless they are bishops.
Source: Code of Canon Law (Vatican.va)