It has not been investigated that if a person is touching a dead body of COVID-19 patient, then touching their own mouth, nose, or possibly their eyes, can infect this person too with the virus. While this might happen, but this is not the main way the virus spreads.
People should avoid touching the body of someone who has died of COVID-19. Older people in particular and people of all ages in general with severe underlying health conditions are under high risk of developing serious COVID-19 illness.