To update a heroku app from ubuntu 18.04 to ubuntu 20.04 you need to set the buildpack stack to a version with a "-20" tag.
For example
$ dokku buildpacks:set-property <app-name> stack gliderlabs/herokuish:v0.5.27-20
Then clear the repo cache and rebuild.
See dokku docs on buildpacks for more details.
Cheers!