It is quite difficult to compare what your main code is doing since you are editing our official sensor API.
If you managed to get gas data read-outs with third-party software, my suggestion would be to compare for both projects which data is written to the BME680, and not only that similar data is written, but also in the same order and timings.
... View more