Ok so it's true. I thought it's weird to air a sister episode in 2008 the same year season 5 episodes are airing in the UK like Stanley S. Squarepants. Yet again Christmas Who? aired in 2005 in the UK the same year as season 4 episodes airing in the UK
I've heard rumors that the episodes "Gary Takes a Bath" and "Shanghaied" were banned in the United Kingdom and Australia due to the "don't drop the soap" gag involved in the script, which was regarded as too inappropriate for a children's cartoon. Also, while SpongeBob is "assaulting Gary's mind with subliminal messages," a picture of a strange, crossed-eyed girl with freckles and pigtails appears suddenly with a giggle that was deemed too frightening for younger viewers. After seven years of not airing, both episodes finally returned to Nickelodeon in Europe and Australia in September 2008 for a single airing. After complaints from parents, the episodes were removed once again and have not aired since in both countries, despite being on the second region release of The Complete 2nd Season DVD. However, the episodes "Gary Takes a Bath" and "Shanghaied" re-aired in Australia in November 2010, and returned to TV on February 27, 2011 in the UK.
To be fair it makes sense. However if you look at the Shanghaied page it aired on July 2003 in the UK and Gary Takes A Bath on October 31st (Halloween) 2008. You said that Gary Takes A Bath returned in September 2008 while the UK premiere was Halloween 2008. If it's less confusing you would have said "Shanghaied was banned cause of the inappropriate jokes of the sister episode and was also banned in Australia for the same reasons and returned in 2008 alongside the UK premiere of Gary takes a Bath. The episodes were banned again until November 2010 in Australia and February 27, 2011 in the UK and still airing today"
I've also heard rumours that "Shanghaied" was banned in the United Kingdom and Australia due to its frightening and dark storyline involving ghosts, along with a disturbing and offending slow-motion scene involving a tired and scared SpongeBob and Patrick getting sprayed with perfumes along to spooky, unsettling music. It was deemed too uncomfortable to watch for younger viewers.