الجواب حامدا و مصلیا
If the deceased did Waqf of his property and built a masjid on it while he was alive and healthy, and permitted people to perform Salah in it, then it has already become a masjid as per Shari’ah. This place will remain a masjid until the Day of Judgment. It is not permissible by any means for the inheritors to take possession of this masjid as inheritance, but an inheritor can in fact become the caretaker of the masjid. As for the house of the decease and the remainder of his property, if he didn’t do Waqf of them, then they are the right of his inheritors and it must be divided amongst them according to the method for division of inheritance prescribed by the Shari’ah. Forcefully taking possession if the property of the deceased and depriving other inheritors of their share is usurping and indeed a form of oppression, due to which it is Haram. He must give the other inheritors their share of the inheritance as prescribed by the Shari’ah and save himself from being taken to task for his action in this world and the hereafter, otherwise legal action can be taken against him.
And Allah knows best.