Hi,
with e.range.getA1Notation() you obtain the name of the range as an A1Notation, for example, B2, C5, F8,...that is the combination of the column and the row. If you want to check it as a named range, you have to obtain first with getRangeByName the A1Notation of the named range. Later, you can check it.
Pay attention if the named range take several cells, because the A1Notation of these would be G2:G7 for example. But when one cell is modified, the A1Notation result of e.range.getA1Notation() gives only one cell (G3 for example), and if you check directly G3 with G2:G7 return False. If you need to implement this situation, maybe it is possible to create one function to obtain all cells inside the range with a1Notation...
I give you a modified code of yours to check it. I hope it helps.
function onEdit(e) {
RANGE_NAME = "MasterClear"
A1NotationOfNamedRange = SpreadsheetApp.getActiveSpreadsheet().getRangeByName(RANGE_NAME).getA1Notation();
if (e.range.getA1Notation() == A1NotationOfNamedRange) {