They do say the first movie is the definite finale and therefore takes place after the second one. My theory is that Sponge Out Of Water takes place before Season 4. Assuming the book made the Bikini Bottomites descend into savagery because Burgerbeard wrote it in, it would appear that some corrupting influence endured, causing the characters to slowly but surely Flanderize, until SpongeBob's transformation at the climax of the first movie.