Event Listener does not work on HTML field with "Display Depends on" enabled

Hello,

I am working on my custom app developing with version-13.
I have a HTML field having a link ID “logframe” and using following code in JS file to show something

document.getElementById("logframe").addEventListener("click", showLogFrameDetail)

It works without “Display Depends On” condition set. But, I need to set “Display Depends”.

Any suggestion will be appreciated.