If you are dealing with an imbalanced dataset and try to weight the loss function or use weighted sampling, you would usually trade the TRP for the FPR or vice versa. I would expect your accuracy to be higher in general for a balanced dataset.
I assume the spikes come from the order of your passed data.
Could you shuffle the data and check, if the spikes are still present?