Question about esp8266 i2c and gps

I use two esp82688 and two GPS modules for distance calculations and display the results on the OLED screen.

But I found that when only esp8266 and GPS modules were connected, they could transfer data normally and calculate the distance. And if I do not use WIFI function, only let GPS data display on OLED,they could work.

If the esp8266(in STA mode), GPS module, OLED together, the OLED can display the picture, but the GPS data cannot be transmitted to esp8266.

Could anyone tell me what is happening?

sketch_sta_1026_ok5.ino (3.64 KB)

ESP8266 is an IC.
Which module do you have?

Also, post code using code tags </>.

.