Currently our documentation says:
Note that while previously it was allowed to delete hosts that are in defined maintenances, now it is disallowed.
which is not correct. It is allowed to remove host which is in defined maintenance, as long as there as least one host left in this maintenance. This description is true if the maintenance will have no hosts left after the delete operation.
This is related to
ZBX-14613 being fixed.