Ever since I installed the 8.12.6v2 the camera 2api seems to not work even after editing the buildprops I have tried everything please can someone help me
Then don't edit build.prop. What you're doing is not a "hidden feature", you're forcing the camera to work in a way it wasn't design to work.
Your device's firmware was not designed to work with Camera2 API, you can thank Xiaomi for that.