how to stop character going into wall lmesh when moving forward

hello there, i am trying to make 2.5D game with a cube. i am facing this weird problem when the cube is moving forward it’s some part of mesh goes inside Wall object mesh also when jumping it’s sticking with wall and if i kept pressing moveforward button it get’s pass the wall. I tried few solutions i found on internet like apply physics material with 0 friction on wall, and use Rigidbody.MovePostion instead of transform.Translate but none worked, so i am asking here
- YouTube (video of problem)

code for movement

  void Update()
        {
            float ver = Input.GetAxis("Horizontal") * speed * Time.deltaTime;
            move = new Vector3(0, 0, ver);
         //   move = (transform.forward * speed * Time.deltaTime);
            RIGIDBODY.MovePosition(transform.position + move);

        }

code for playerJump

  public class PlayerJump : MonoBehaviour
    {
        [SerializeField]
        protected float JumpForce;
        [SerializeField]
        protected float FallMultiplier;
        [SerializeField]
        protected float lowJumpGravity;

        public bool IsGrounded;
        public bool CanDoubleJUmp;
        public bool Dowalljump;

        public BoxCollider dectorCollider;
        public CharacterControl characterControl;
        void Start()
        {
            characterControl = GetComponent<CharacterControl>();
        }
        void Update()
        {
            WallJumping();

            if (Input.GetKeyDown(KeyCode.Space))
            {
                if (IsGrounded)
                {
                    characterControl.Jump = true;
                    CanDoubleJUmp = true;
                }
                if (!IsGrounded)
                {
                    if (CanDoubleJUmp)
                    {
                        characterControl.DoubleJump = true;

                    }
                }
            }
            if (Input.GetKey(KeyCode.Return))
            {
                Dowalljump = true;
            }
        }
        void FixedUpdate()
        {
            IsGrounded = false;
            ApplyGravity();
            Jump();
           
        }
        void ApplyGravity()
        {
            //if character is falling increase acceraltion
            if (characterControl.RIGIDBODY.velocity.y < 0f)
            {
                characterControl.RIGIDBODY.velocity += Vector3.up * Physics.gravity.y * (FallMultiplier - 1) * Time.deltaTime;
            }
            //if it's  in air make him fall don't keep going up
            else if (characterControl.RIGIDBODY.velocity.y > 0f && characterControl.Jump == false)
            {
                characterControl.RIGIDBODY.velocity += Vector3.up * Physics.gravity.y * (lowJumpGravity - 1) * Time.deltaTime;
            }
        }

        void Jump()
        {
            if (characterControl.Jump == true)
            {
                characterControl.RIGIDBODY.AddForce(Vector3.up * JumpForce, ForceMode.Impulse);
            }
            if (characterControl.DoubleJump == true)
            {
                CanDoubleJUmp = false;
                characterControl.RIGIDBODY.AddForce(Vector3.up * 6f, ForceMode.Impulse);
            }
            characterControl.DoubleJump = false;
            characterControl.Jump = false;
        }
        void OnTriggerStay(Collider GroundColider)
        {
            if (!GroundColider.isTrigger && GroundColider.gameObject.tag == "Ground")
            {
                IsGrounded = true;
            }
        }

        void WallJumping()
        {
            RaycastHit leftHitInfo;
            RaycastHit RightHitInfo;

            if (Physics.Raycast(transform.position, this.transform.forward, out RightHitInfo, 0.5f))
            {
                Debug.DrawRay(transform.position, this.transform.forward * RightHitInfo.distance, Color.red);
                Debug.Log(RightHitInfo.collider.tag);

                if (!IsGrounded && Dowalljump == true)
                {
                    if (RightHitInfo.collider.tag == "RightWall")
                    {
                        characterControl.RIGIDBODY.AddForce(RightHitInfo.normal * 6f, ForceMode.Impulse);
                        characterControl.RIGIDBODY.AddForce(Vector3.up * 8f, ForceMode.Impulse);
                    }
                }
                Dowalljump = false;
            }

            if (Physics.Raycast(transform.position, -this.transform.forward, out leftHitInfo, 0.5f))
            {
                Debug.DrawRay(transform.position, -this.transform.forward * leftHitInfo.distance, Color.red);
                Debug.Log(leftHitInfo.collider.tag);

                if (!IsGrounded && Dowalljump == true)
                {
                    if (leftHitInfo.collider.tag == "LeftWall")
                    {
                        characterControl.RIGIDBODY.AddForce(leftHitInfo.normal * 6f, ForceMode.Impulse);
                        characterControl.RIGIDBODY.AddForce(Vector3.up * 8f, ForceMode.Impulse);
                    }
                }
                Dowalljump = false;
            }


        }
    }

.

MovePosition will go through walls, it needs to be paired with a raycast, most likely a CapsuleCast in your situation.

If you wish to avoid this kind of issues, simply use AddForce or set the velocity depending on input.