What you're calling "screen ID" is just the index of the screen within the array. You can't rely on it to identify the screen.
You'd probably have better luck using
the DeviceName
property[
^]:
public static void ShowByCoordinates(Window window, string screenName, int LeftTransform, int TopTransform)
{
Screen s0 = Screen.AllScreens.FirstOrDefault(s => s.DeviceName == screenName) ?? Sreen.PrimaryScreen;
Rectangle bounds = s0.WorkingArea;
window.Left = bounds.X + LeftTransform;
window.Top = bounds.Y + TopTransform;
window.Show();
}