Harry Potter author J.K. Rowling has said Avada Kedavra to scores of witches and wizards throughout the book series ― but filmmakers killing off yet another character could have solved a major problem in the movies. With thousands of pages to fit into just hours on screen, it was inevitable that the Harry Potter films would have to forgo some character development. Sacrificing one person who almost didn't survive the fifth book, Harry Potter and the Order of the Phoenix, could have remedied this issue for the screen version of one of Harry's closest friends.
https://screenrant.com/harry-potter-cancelled-book-death-arthur-movie-problem-save/