There is a micro switch in the boot switch which operates the internal light; more importantly, it also indicates the boot is open to the alarm system as well and so can be the cause of the alarm going off.
So far, I have had 3 replacement boot mechanisms (as it is the microswitch and the electric unlocking mechanism) since 2002 on a Clio 172. Each time the new switch lasts for 4 years or so before the microswitch wears out. I have though about replacing the microswitch itself but there are difficult to obtain and fit - and will wear out again.
There is an alternative approach, which I will use in the future, of disconnecting the microswitch and fitting a tilt switch onto the boot lid instead. The two wires from the microswitch are desoldered at the switch and resoldered to a tilt switch. This switch contains a small ball bearing that makes contact when the boot is opened and is Normally Open when the boot is closed. This works fine - the contact needs only to occur, to switch the internal light on, when the boot is nearly fully open for access. The tilt switch does not need to make contact when the boot is slightly ajar as you can't see into the boot space anyway.
This is the type of switch used and can be permanently wired in. The good news is that is will not wear with time. And the SW 520D, or similar, is readily
available. See
https://www.sunrom.com/p/sw520d-sw-520d-tilt-sensor
I've already fitted a tilt sensor and tested it. Using the connector from and old Renault boot mechanism part wired to the tilt sensor, I am now
ready for when the microswitch eventually fails again.