Xamarin Forms Service with IsolatedProcess crashes

I'm developing an Android application with Xamarin Forms that is composed of an interface and also a background service. I need that the service works also when the interface application is closed. If I add "IsolatedProcess = true" into the service the graphical interface still works but the service crashes. I read a lot of posts with possible solutions but they don't work. (I tried to compile in release mode and also to remove "Use Shared Runtime" flag).

I'm compiling with Android 8.1 (Oreo) as Target Framework. The target environment is Android 4.2.

I start the service into OnCreate method of the MainActivity class:

Intent testIntent = new Intent(this.BaseContext, typeof(TestService));
StartService(testIntent);

The service class:

[Service(IsolatedProcess = true, Exported = true, Label = "TestService")]
public class TestService : Service
{

    public override IBinder OnBind(Intent intent)
    {
        return null;
    }

    public override void OnCreate()
    {
        base.OnCreate();

    }

    [return: GeneratedEnum]
    public override StartCommandResult OnStartCommand(Intent intent, [GeneratedEnum] StartCommandFlags flags, int startId)
    {            
        Device.StartTimer(new TimeSpan(0, 0, 40), () =>
        {
            //Code executed every 40 seconds
        });

        base.OnStartCommand(intent, flags, startId);
        return StartCommandResult.Sticky;

    }

    public override bool StopService(Intent name)
    {
        return base.StopService(name);
    }

}

If I remove "IsolatedProcess = true" the service works but it will be stopped when I will close the application interface process.