How would I solve this problem?

Turning off rotation is the same thing as what Niantic did to Pokemon GO’s tracking feature. (It’s a tad buggy, lets disable it entirely instead of fixing it!)

The bug is caused because it’s touching the slope one frame, and then touching the floor another. Turning off rotation wouldn’t fix the bug, it’d just not be visible anymore.