Which material enclosure to avoid impeding signal of Bluetooth and wifi?
The inverted F antenna on many ESP modules is tuned for the band used by the module and can be de-tuned by other material in close proximity. space the antenna away from the material to avoid this effect. 10mm is probably enough.