He gets stuck to the paper because he's a drawing.
DoodleBob gains the upper hand and is just about to finish SpongeBob off, but then he steps on a piece of lined paper from a notebook that got knocked off a shelf during the scuffle. However, SpongeBob notices and they engage in a heated battle of erasing and drawing back. DoodleBob then draws the rest of his body again. The arm returns to SpongeBob's house and retakes the Magic Pencil while he's sleeping.
Eventually, SpongeBob retakes the Magic Pencil and erases almost all of him except for his arm. In the duo's attempts to get it back, DoodleBob finds more ways to harm them, such as drawing a hole beneath their feet, knocking Patrick out with a bowling ball and a wrench. He then attacks SpongeBob and Patrick and steals the Magic Pencil. DoodleBob was drawn by SpongeBob with the Magic Pencil for the 'ultimate prank.' However, DoodleBob beats up Squidward.