There can be two causes:
Hardware failure. Unlikely, but a possibility.
Each device has multiple sub-models, and each sub-model has multiple ROMs. You need to be sure you're installing the ROM meant for your exact device model, even if you are re-installing a stock ROM. If you do install a ROM not meant for your device, you often face issues like these.
The solution for this is to first confirm your exact device model:
- Boot into your device's bootloader and look up the device version/model.
- Open the download page of the ROM you installed
- Download the version specific to your model
- Install the ROM the usual way, but be sure to do a full wipe/clean of all partitions first from the recovery.