First you have to find out where they go out. It must from a hole or so. just watch them.
then you can use something (foam) to seal the hole. These bees will die inside.