If you use self-hosted Matomo, heatmaps and session recordings are kept indefinitely.

If you use Matomo Cloud, heatmaps and session recordings are kept for 3 months.