How to use 2 I2C and UART simultaneously in ESP32?

That MAX30100 module is not a good design. On the module are pullup resistors of 4k7 to 1.8V.

I think that the MAX30100 library want to be able to track the heartbeat and has a timeout. I suppose that the GPS functions take some time to read the serial data.

This is the explanation for TinyGPS++ : http://arduiniana.org/libraries/tinygpsplus/
Your code does this:

if (SerialGPS.available() > 0)
  {
    if (gps.encode(SerialGPS.read()))
    {
      if (gps.location.isValid())

It is possible to use the 'encode()' all the time and the 'isValid()' when the heartbeat is not need to know. Is there a moment that the heartbeat is not measured.