Class 3 Ebikes have a max speed with throttle and a max speed they can obtain with pedal assist. 

With throttle only, the top speed is approximately 20mph based on a smooth surface, flat terrain, little to know wind and an approximate rider weight of 170lbs. 

With pedal assist the max speed is 28mph for Core-5, 500 Series, 700 series, LMT'd (The Roadster V2 has a max assisted speed of 24mph). Once you exceed this top speed, it may seem like the bike is slowing down or becomes harder to pedal, this is because the motor stops assisting once you pass the max speed. Once you go below that speed and continue to pedal, the motor will begin assisting, but there may be a short delay.

If you are not able to reach your max speed, you can check the settings in your display: 500 Series & Core-5 Display or 700 Series & LMT'd Display
Is the PAS level you are using set to 99%?
The limit for the speed can be adjusted as well and may be set to a lower amount.

Other common issue limiting speed could be a bike that needs a tune up, misaligned wheels, brakes rubbing, low tire pressure, etc. Lastly, if you suspect something else may be causing this, viewing the Watts being sent to the motor as you compare can be a good indicator if there is another issue.