You're expecting too much from a device that isn't designed for your application.
Just buy a Racebox, it does all this for you with extremely high accuracy and 25Hz update rate. It also has a purpose built antenna and multi-constellation support. Mounting with a clear field of view is also critical.
The reason you have GPS dropouts is almost certainly the crappy antennas in all modern phones. Most cell antennas actually have negative gain in most points on the sphere surrounding the device. (I work in radio including with GNSS systems.) And also combined with poor placement, this results in signal obstruction by the roof when driving in some directions. Remember that GPS satellite orbits are not polar but rather at 55 deg inclination. So there are most certainly driving geometries where a phone on a dash mount will have a suboptimal geometry relative to whichever birds are presently in "view".
Trying to "fuse" other sensor data just reinforces the point that phones are not designed for high-Hz, high-precision location applications. They are consumer devices engineered for consumer use cases.
My phone has enough to do running RaceChrono and processing BT telemetry streams from OBD/CAN. Even if I could mount it somewhere it could get consistent GNSS receive power I'd rather delegate that function to a fit-for-purpose device. Decoupling lap datalogging from position also lets me put the RaceBox in an idealized location for sky FOV.