The iPad air has contains 2 magnet sensors. (Not to be confused with the magnets in the sides of the iPad casing.) The sensors detect the magnets in the smart cover and lock the screen.
1 sensor is on the motherboard near the LCD connector. As shown here in red:
The second one is one the home button flex cable. This one is part of the cable not the body of the iPad. As shown here:
Make sure the replacement digitizer has a home button with the sensor included. You may find the components are missing from the flex cable, causing the smart cover autolock to work erratically or not at all. Another effect of the missing home flex sensor is that the ipad may lock itself when the smart cover is folded behind the iPad.
If the new home flex cable is defective, transfer the original flex from the broken digitizer.