Update() function lagging when timeScale set to 0

Hello!
I have a 2D game in which I execute the following function:

using UnityEngine;
public class GameTimeController : MonoBehaviour
{
    
    private float fixedDeltaTime; 
    public static GameTimeController Instance { get; private set; }

    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
        }
    }

    
    private int count = 0;

    public static bool paused = false;


    void Start() {
        fixedDeltaTime = Time.fixedDeltaTime;
    }

    public void Pause()
    {
        Physics2D.autoSimulation = false;// pause physics
        Time.timeScale = 0;
        Time.fixedDeltaTime = fixedDeltaTime * Time.timeScale;

    }

    public void Resume() {
        Physics2D.autoSimulation = true;// resume physics
        Time.timeScale = 1;
        Time.fixedDeltaTime = fixedDeltaTime * Time.timeScale;
    }

    void Update() {
        if (Input.GetKeyUp(KeyCode.P) && !MapCamera.mapEnabled) {
            if (!paused ) {
                Pause();
            } else {
                Resume();
            }
            paused = !paused;
        }

        if (paused) {
            count += 1;
            Debug.Log(count);
        }
    }
}

I am executing it on a blank scene with only a default camera added, with this script attached.

The count Log output leaps as expected and at some point (usually around 800) it starts to lag and I can see the count sequentially increase.

If I run the same script on a blank project this does not happen.

I’ve ran Profiler and Memory Profiler and I can’t find anything of interest. Aside from the default packages the project is using for e.g. Universal RP Shader Graph and Ink compiler. But as I said, my test scene does not have anything else than a default Camera.

I created this blank test scene because I was noticing considerable lag when executing this on my level play scene.

On my level play scene, on build mode, the lag is barely noticeable, but what when resuming the pause mode there is considerable lag, same as described here: https://forum.unity.com/threads/physics-lag-after-pausing-and-resuming-using-time-timescale.328480/ … However those solutions were implemented and I still experience it.

Any ideas on what can I try?
Thank you