It's just the way it is, you've got a snake in a tub. The only way to stop the rubbing is to put your snake in an an enclosure so large that it has no desire to get out. I have a hatchling in a 180 gallon enclosure, he doesn't rub... but thats obviously not going to be workable for everyone!