Build better shelters.
But more than that: You can require certain things, like not being violent with other folks. That they clean up their own messes. Provide mental and physical health care at the shelter and offer medical help in weaning off drugs. This won't work in an environment that isn't safe and secure, for both the person and their stuff.
More unpopularly: Require that they shoot up in the proper location, where there are sharps boxes and so on. Get treatment for folks or employ trained staff to help folks shoot up (if you can't help folks stop, we can do it as safely as possible).
And no, it won't be perfect. It rarely is. But it is a much better start than the shitholes we call homeless shelters now. Stop treating folks like animals, even if you look down on their lives.
This discussion is about the former: is it a good idea to have safe injection or maintenance facilities at or near shelters? The consequences you are describing sound to me like symptoms of the latter, which are not widely described at actual safe injection or maintenance sites.
The problem with simple solutions is that many people don't want to do what you think they should do. They don't want safe injection, they want their hit now. They want to drink until they pass out. They want the freedom to make bad choices.
Few people, including other guests, want to deal with these and the safety issues and so fewer come (including the volunteers).