Mister Rogers song goes “won’t you be my neighbor”. I was always told that Won’t is derived from will not. So to check it’s correct usage if you can substitute will not and it makes sense then won’t can be used. Thus Mister Rogers’ use is incorrect in that “will not you be my neighbor” does’nt make sense. True?
You were told wrong.
Won't is indeed derived from will not, but that does not mean that it has the same grammar as will not.
Won't you be my neighbor? is perfectly normal English, grammatical in every variety I can think of.
Will not you be my neighbor? is not grammatical in most (maybe all) current varieties of English, though it was used a couple of centuries ago.
As WS2 says Will you not be my neighbor? is the current expansion of Won't you be my neighbor? It is grammatical, though it sounds a bit stilted.