Definitely. Maybe it's because I write a lot of slice-of-life, but I approach the matter with the mentality of 'death is a part of life, and being a main character doesn't make them immune'.
Right now I'm working on an large story that will span four books and has twelve main characters (three per book). By the end of the fourth book, two of those characters will be dead. Both for a good, plot relevant reason; self sacrifice to save others.
At the same time, I get not wanting to kill off a main character because your readers like them. Heck, I grew really attached to a character I wanted to kill off and actually went looking for a way to bring them back. I needed to have someone tell me that bringing them back would cheapen the sacrifice they made. Now it's become my mission to make readers cry when the death eventually happens.