This can also be a function of the pickup roller spacing on the engine VS the length of part in the switch.
Does this happen with all your engines or a select group?
You mention pickup roller in the singular, Do your engines have 2 rollers each?
If not consider adding a second pickup on each engine as the best solution.
Are all your engines of the same basic type? <Spacing between rollers similar>
Are all your switches the same radius? What brand of switches?
These details are critical.
Finally, for troubleshooting:
Run an engine through a switch while watching the pickup rollers.
Are both rollers hitting the frog or unpowered sections of rail at the same time?
If you can't see the pickup rollers while running, go dead slow, when the engine stops, kill the track power.
Without moving the engine forward or back, tip it away from yourself and see where the pickup rollers are hitting the center rail. Are they both on plastic or unpowered or frog sections of the switch?
If so there are several possible solutions:
Can you rotate the pickups to change the spacing? cost = time
Can you add a pickup facing the other way with an existing pickup? cost = extra pickup
Can you change to a different radius switch? cost = new switches <High>