Latest k8s plugins causing issue with podTemplate inheritance

Jenkins setup:

Jenkins Version: 2.516.2

K8s plugin: 4358.vcfd9c5a_0a_f51

We have defined multiple cloud and podTemplate for kubernetes agent like dev cloud will have dev podTemplate and similar for different team or projects

For addition container we defined something like this

python3_container = [
  spec: [
    containers: [
      [
        name: "python3",
        image: "python:3.9.19",
        command: ['sleep'],
        args: ['99d'],
        env: [
          [name: 'HOME', value: '/home/jenkins/agent'],
          [name: 'GIT_SSH_COMMAND', value: 'ssh -i /home/jenkins/agent/.ssh/id_rsa -o UserKnownHostsFile=/home/jenkins/agent/.ssh/known_hosts']
        ]
      ]
    ]
  ]
]

pipeline {
  agent {
    kubernetes {
      inheritFrom 'dev'
      yaml writeYaml(returnText: true, data: python3_container)
    }
  }

  stages {
    stage('Prepare environment') {
      steps {
        container('python3') {
          sh "pip3 install --index-url https://artifacts.corp.zoom.us/artifactory/api/pypi/zoom-pypi-virtual/simple pipenv"
          sh "pipenv --version"
        }
      }
    }
....
}

but this doesnt work now, till previous k8s version it works flawless . And we have different namespace for each agent and jenkins-controller.
Earlier by default if we define whole pod template in jenkinsfile then it uses jenkins namespace to launch a agent and it worked fine but now it tries to launch in ‘default‘ namespace and fails because jenkins doesnt have access to ‘default‘ namespace