had the same issue with one of my XT levers..
you can actually buy the plastic parts that sit on top of the rubber membrane.. its called the separator unit
but replacing that didnt solve my issue.. and cost the best part of £10 including shipping!
i think the membrane itself must have developed a tiny leak somewhere i couldnt see. Unfortunatley i didn’t find the actual membrane anywhere for sale as its not listed as a separate part on the brake lever diagram..
you could try a bit of liquid gasket or similar around the edge of the membrane..
or do what i and most other people end up doing due to the lack of spares and just buy a new lever.. they’re only £23.49 from CRC