The mechanics of separation of recyclable materials can become endlessly complex. When I see something like this, I try to incorporate into my habits so I no longer need to think about it. Although the headline above tells you what you need to know, these articles explain why you need to make the change.
https://lifehacker.com/stop-recycling-plastic-bottles-without-caps-on-1832992981
https://lifehacker.com/think-twice-before-recycling-black-plastic-1832868090