I am able to reproduce — and solve — this problem on my completely different configuration. But let’s see if the reason on my system is the same as yours.
On my system, AI and range masking normally work as expected, but I asked myself: Some features are disabled for older Process Versions, could that be it? So I went to a folder with old raw images that use Process Version 1, and sure enough, AI and range masking do not work.
But if all I do is update the Process Version to the current version, then they work.
On your system, when AI and range masking does not work, are the images using an older Process Version? And if you update the images to the current Process Version (in the Develop module, choose Settings > Update to Current Process Version), do AI and range masking now work?