I have lived in Malmö, except for a few short breaks, for the last 30 years and I think Malmö is safer now than ever before.
However, this is also because Malmö was the crime capital of Sweden up until 2018-2019 or so, when the police made a hugely successful operation with disturbing the gangs that dealt drugs on the streets in many different ways. These gangs were also wreaking havoc in Malmö with lots of shootings and other noticeable crimes.
After this special operation in Malmö, these types of crimes dropped drastically but unfortunately spread to nearby cities such as Helsingborg, Hässleholm and Kristianstad. Now it has moved even further north and it seems like the Stockholm/Uppsala area is definitely the center of all of those things you read about online.
If you're not involved in heavy crime, you will be completely safe. Of course you should take the regular safety measurements as in any sizeable city. If a stranger (that's not an obvious ESC fan) starts talking with you, be careful, because that's not normal behaviour in Scandinavia
The media also makes it seem like Sweden has become a third world country when it comes to crime and gangs. This is of course not true and a huge exaggeration. It plays more on the reputation of Sweden being a "perfect" society back in the 1970s which never was true in the first place.
I understand that you are worried and the situation is definitely bad in some parts of Sweden right now. But I think you will be completely alright in Malmö. It's not the most charming place on earth, but May is probably one of the best times to visit. We definitely have some beautiful spots and a great food scene that you definitely should take your time to explore!