I don’t actually work with bats, though they often are companions in the caves I’m in! With the monkeys I’m going to be working with in my current project, we are careful to not harm them. We’ll mostly be observing them from a distance, and collecting biological samples that they leave behind.
There are strict guidelines governing how animals are treated in science, so if you work with animals, you need to submit a proposal before an ethics committee before your research can be approved. These ethics committees are in place to ensure the welfare of the animals being used and to validate the scientific significance of the proposed research.
I don’t kill bats myself, but sometimes they have to be sacrificed for research. I do use a lot of dead specimens (for their skulls), which means a previous scientists collected and sacrificed them. We always make sure when we have to sacrifice animals that there is no other alternative.