Keep entity object after getTitle() method in render() method in a custom controller
When I try to save the entity to my class as $this-&gt;entity It gets
lost when the Render() function gets called.

Use a service. Services are singletons and when the class resolver finds an existing service it loads the instance from the container and doesn't create a new class instance:
defaults:
  _controller: 'my_service:render'
  _title_callback: 'my_service:getTitle'

For good practice this is not really necessary in this case because entities are cached in memory automatically and loading an entity twice doesn't have a performance impact.
Good practice, though, would be to load the entity via route parameter upcasting:
foobar.view:
  path: '/foobar/{foobar_placeholder}'
  defaults:
    _controller: '\Drupal\foobar\Controller\Foobar::content'
    _title: 'Oh yeah foobar'
  options:
    parameters:
      foobar_placeholder:
        type: entity:foobar

Example from https://www.drupal.org/docs/8/api/routing-system/parameters-in-routes/parameter-upcasting-in-routes