This has always been an issue in media, as it sadly happens all the time, however within the last several weeks there have been an unfortunate amount of deaths of minorities on various programs. Even more so are some reported details that the actors involved were mistreated behind the scenes that prompted them wanting/needing to leave the show. From supporting to even main characters on their own damn show, they are being killed off in pointless, senseless fashions, or hell just written off with no reasonable explanation or even respect to the actors at all, that is severely disappointing and depressing. I'm not even in some of these fandoms, but I'm still bitter on their behalf nonetheless.
When you have a character of a marginalized group (women, LGBTQ+, racial minorities) who don't have much positive mainstream media representation to begin with, there is certain responsibility to uphold. We're not asking for special treatment, just treat these characters as human beings and not expendable objects by repeatedly perpetrating reprehensible tropes and stereotypes. Remember, representation does matter. When you have a minority character present in the story that is a conscious decision made and when said character is mistreated, that is a clear message you're sending to that particular audience. So don't act oblivious or surprised (or worse, holier-than-thou) when there is an uproar or backlash from the fanbase.
Also, while character deaths are never easy and are meant to be devastating, it should only be done when it is respectful to the character and their overall arc and presence in the story. The constant overuse and abuse of this "anyone can die" trope is not ~shocking or ~unexpected, but predictable, lazy writing that shows how little thought goes into it.