GM:EntityKeyValue hook not called on map entity

I’m trying to use the GM:EntityKeyValue hook to detect a key value change in a map entity (logic_compare in this case). However, the hook does not seem to be called if the key value is set within the map (not sure if it even works when set through Lua). Is there any special steps to get this hook to work in this case or if not, what is the best way to listen to a map entity’s key value and run code on change.

Is there any alternative to this hook if it does not work with map entities?

Is this intended behaviour?