I found the answer in another thread. Seems like M8N often ships outputting both NMEA and UBX formatted messages and PX4 firmware doesn’t handle that well. So the solution is to go to ublox.com, download the free U-Center firmware application and disable the NMEA messages.
Or, if you are a coder, fix the firmware to allow selection of one protocol or the other and disregard/drop the other messages.
Previous thread on this: Ublox M8N with Pixhawk