The UV kills the virus. Sunscreen is perfectly fine. The virus does not survive in the droplets in the UB snd high humidity. Not sure I would tell people to get skin cancer and melanoma.
Basking is much different than 10 minutes in the sun. Good old common sense. Stay under an umbrella or clothing cover otherwise.