Accessibility APIs return false although app is built with assessment entitlement

My app has been built with assessment entitlement included. My macbook running OSX 10.13.5 has been enrolled in MDM server. I have deployed a profile to my macbook using the MDM server with my app ID in the allowed apps. I see the app being added to the System Preferences->Security & Privacy ->Accessibility. But when I run the app, I see the values of AXIsProcessTrusted(), AXIsProcessTrustedWithOptions((CFDictionaryRef)options as 0.