This is not an UI bug a simple search would have told you
It is allowed to have duplicates, when you add a single song there’s a number counter next to the playlists to indicate if the song is already present in that playlist or not.
There’s also a 3 dots menu in the playlist to remove duplicates if you add some by mistake and don’t want them.