issues with Update() in turn-based movement

Hello!
I’m trying to make turn-based game. At this point i have few object on scene .

So i’m trying to do basic movements of player and npc. After player moves, npc also moves to player direction. Also they can’t go into wall and into each other and they can move only to 4 directions.

My issue is that sometimes NPC don’t “see” player changing it position. So if they move to each other, sometimes npc can go inside player. Or if they stay next to each one and player moves away, npc should follow, but some times he stay , like players is still there.
After a lot of time spend, i think the issue is in Update() , cause if i use FixeUpdate(), there no such issues. But with FixeUpdate() it’s not always respond to key’s pressed at once.

So any advice’s how to fix this problem? Should i use Update at all or there is other possible solutions?

there is my codes:

  1. GameManager :

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class GameManager : MonoBehaviour
    {
    public GameObject player, enemy;
    //private PlayerController playerController;
    private EnemyMovingToPlayer enemyMovingToPlayer;
    private PlayerController playerController;
    public static bool playerTurn = true;
    void Start()
    {
    playerController = player.GetComponent();
    enemyMovingToPlayer = enemy.GetComponent();
    }

        void Update()
         {
             if (playerTurn)
             {
                // player.GetComponent<PlayerController>().PlayerMovement();
                 playerController.PlayerMovement();
             }
             else
             {
                 //enemy.GetComponent<EnemyMovingToPlayer>().EnemyAI();
                 enemyMovingToPlayer.EnemyAI();
             }
    
         }
    

    }

  2. Player

    public class PlayerController : MonoBehaviour
    {
    public int moveSpeed = 1;
    private Vector3 playerDestenation;

    public void PlayerMovement()
     {
         if (Input.GetKeyDown(KeyCode.A))
         {
             playerDestenation = transform.position + new Vector3(-moveSpeed, 0, 0);
             transform.rotation = Quaternion.Euler(0, -90, 0);
             //transform.localEulerAngles = new Vector3(0, -90, 0);
             //if (!Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), moveSpeed))
             if (!Physics.Raycast(transform.position, transform.forward, moveSpeed))
             {
                 transform.position += new Vector3(-moveSpeed, 0, 0);               
           
             }
             if (playerDestenation == transform.position)
             {
                 GameManager.playerTurn = false;
             }
         }
    
         else if (Input.GetKeyDown(KeyCode.D))
         {
             playerDestenation = transform.position + new Vector3(moveSpeed, 0, 0);
             transform.rotation = Quaternion.Euler(0, 90, 0);
             //if (!Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), moveSpeed))
             if (!Physics.Raycast(transform.position, transform.forward, moveSpeed))
             {
                 transform.position += new Vector3(moveSpeed, 0, 0);
             }
             if (playerDestenation == transform.position)
             {
                 GameManager.playerTurn = false;
             }
         }
         else if (Input.GetKeyDown(KeyCode.W))
         {
             playerDestenation = transform.position + new Vector3(0, 0, moveSpeed);
             transform.rotation = Quaternion.Euler(0, 0, 0);
             //if (!Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), moveSpeed))
             if (!Physics.Raycast(transform.position, transform.forward, moveSpeed))
             {
                 transform.position += new Vector3(0, 0, moveSpeed);
             }
             if (playerDestenation == transform.position)
             {
                 GameManager.playerTurn = false;
             }
         }
         else if (Input.GetKeyDown(KeyCode.S))
         {
             playerDestenation = transform.position + new Vector3(0, 0, -moveSpeed);
             transform.rotation = Quaternion.Euler(0, 180, 0);
             //if (!Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), moveSpeed))
             if (!Physics.Raycast(transform.position, transform.forward, moveSpeed))
             {
                 transform.position += new Vector3(0, 0, -moveSpeed);
             }
             if (playerDestenation == transform.position)
             {
                 GameManager.playerTurn = false;
             }
         }
         else if (Input.GetKeyDown(KeyCode.Space))
         {
             GameManager.playerTurn = false;
         }
     }
    

    }

  3. Enemy

    public class EnemyMovingToPlayer : MonoBehaviour
    {
    private Transform player;
    private float snappedValue;

     void Start()
     {
         // player = GameObject.Find("Player").transform;
         player = GameObject.FindWithTag("Player").transform;
     }
    
    
     public void EnemyAI()
     {
         transform.LookAt(player);
         snappedValue = Mathf.RoundToInt(transform.rotation.eulerAngles.y / 90) * 90;
         transform.rotation = Quaternion.Euler(0, snappedValue, 0);
         RaycastHit raycastHit;
         //if (!Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), 1))
         if (!Physics.Raycast(transform.position, transform.forward, out raycastHit, 1))
         {
             transform.position += transform.forward;
             transform.LookAt(player);
             snappedValue = Mathf.RoundToInt(transform.rotation.eulerAngles.y / 90) * 90;
             transform.rotation = Quaternion.Euler(0, snappedValue, 0);
             GameManager.playerTurn = true;
         }
         else
         {
             if (raycastHit.collider.transform == player)
             {
                 Debug.Log("Player got hit");
             }
             transform.LookAt(player);
             snappedValue = Mathf.RoundToInt(transform.rotation.eulerAngles.y / 90) * 90;
             transform.rotation = Quaternion.Euler(0, snappedValue, 0);
             GameManager.playerTurn = true;
         }
    
     }
    

    }

I would make it was more simpler, code it all in a 2d grid and then just set the objects in the correct space using the grid data. No need for physics or for gameObjects to have updates. You should have one script that has an update that manages the board and who’s turn it is.