See my answer here:
Another possibility might be to use a React Native Vision Camera frame processor plugin to invert the image before trying to detect the barcode. I assume you could modify one of the existing plugins. e.g.:
- rodgomesc/vision-camera-qrcode-scanner: A plugin to read barcodes using MLKit Vision QrCode Scanning
- xulihang/vision-camera-dynamsoft-barcode-reader: A plugin to read barcodes using Dynamsoft Barcode Reader.