#4? That would be 4 wires in an inch. That translates to about 6mm, or big enough for the bees, drones, queens, and wasps to get through. Why are you trying to imprison the queen? If she isn't going to stay, there's not much you can do.
If she's laying eggs, they will probably stick around. If you have dead bees piling up at the door, you are cultivating disease. Bees are smart enough to avoid places where disease will kill them.
I would reduce the entrance way down, maybe an inch wide, and let them decide. Hardware cloth will keep the mice and bumblebees out. A queen excluder will keep her in, but she would have to fly in order to mate. The smell of brood is the best "keeper" there is.