When you want to say "I want to be with you," you can say
Both meanings are the same.
But when you want to say "I want to sing with you," you can say
but you can't use そばに in this case.
You can say あなたのそばで歌いたい but it means "I want to sing close by you," which means the speaker just says that he or she wants to sing next to you. The speaker say nothing about whether you sing or not.
I hope my English makes sense.