Question: Is it permissible to transfer a mosque’s waqf to another mosque?
Answer—and Allah is the One who grants success: It is permissible to transfer something of the waqf to another mosque when the originally endowed mosque is not in need; if it is in need, transfer is not permissible.
Source: Min Thimār al-ʿIlm wa al-Ḥikmah vol.2