The best word to replace "whimsical" in the sentence while maintaining both its denotative and connotative meanings is "playful."
"Playful" captures the lighthearted and whimsical quality of Woody's smile, suggesting a sense of fun and joy, similar to the original word.