It won’t just be the antanna that’s the problem - Encapsulating any sort of RF device is a really bad idea. Even UHF tx/rx modules don’t like it. The encasulant’s dielectric properties mean that things like the stray capacitance of tracks and between coil windings will be different from their carefully-designed values in air.
If you really must encapsulate ,you need to create a pocket inside for the module, or use one with a sealed (or selable) screening can, so the compound never touches critical parts of the PCB or components