I had something like that on my 2000 accord EX MANUAL.
The car would not go above 4000 RPM. It turned out to be when the VTEC system kicks in. It did not have enough oil pressure needed to do that so the ECU throttles it around the 4K RPM.
The fix was to add oil. Mine I found was really low.