This behaviour is actually documented in https://github.com/HangfireIO/Hangfire.InMemory?tab=readme-ov-file#maximum-expiration-time
Specifying the InMemoryStorageOptions fixed the problem. In my case:
builder.Services.AddHangfire(configuration => configuration
.SetDataCompatibilityLevel(CompatibilityLevel.Version_180)
.UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings()
.UseInMemoryStorage(new InMemoryStorageOptions { MaxExpirationTime = null })
.WithJobExpirationTimeout(TimeSpan.FromDays(60))
);