WindowsTerminal not displaying windowsTitle of other terminals

I have just started with batch scripting, and I’m trying to close(kill) a running batch from another batch.

I have set a tile for my main script file, and trying to kill it from another batch file but I’m getting an empty response.

Main.bat

@echo off
title test1
setlocal enabledelayedexpansion

kill.bat

taskkill  /FI "WINDOWTITLE eq test1" /F

So to debug this , I tried running TASKLIST /v /fo list |find /i "window title" |find /v "N/A", when I run it in terminal 1 it shows windowTitle of terminal 1 but not windowTitle of terminal 2, and when I run it in terminal 2 it shows of 2 but not 1.

So I decided to open a terminal in admin mode, and here is the interesting thing, when I copy TASKLIST /v /fo list |find /i "window title" |find /v "N/A" from terminal 1 it behaves as terminal 1 and when I copy the same command from terminal 2 it behaves as terminal 2.

why is this happening? and how can I resolve it?

This is in windows 11