The way I read it is if you use throttle-only you can reach 20 mph, but then if adding pedal-power you reach 28 mph. The pedal is probably not generating sufficient force to add 8 mph, but it’s telling the control system to do that.
class 2 and class 3 are mutually exclusive. You cannot legally have an e-bike that supports throttle up to 20mph that can also continue to e-assist if you pedal up to 28mph. While it's technically possible in software to switch between these modes, consumers aren't supposed to be able to do this on their own.
No consumer GPS is precise enough to reliably distinguish between a bike path and an adjacent regular road, especially if there are any overhead obstructions nearby. Many bike paths don't have a 20mph speed limit anyway.