Navmesh pathfinding with changing movespeed movespeed, fastest vs shortest rout

Hi, Im making a 2D game and I try to apply pathfinding for mane character and mobs AI inbetween colliders. This is all fine, but I am in a situation where I want to apply specific movespeed change within a chosen area, mesh, this movespeed change is changing gradually towards a certain direction based on a percentage of the normal movespeed. For example within this mesh the charater should walk at 50 percent movespeed vertically, 100 percent movespeed horizontally and at 75 percent movespeed in the direction that is inbetween these two.

If this is possible, I guess it will be hard for pathfinding algorithm to find best rout because shortest rout might not be the fastest rout. Is it possible to generate paths based on fastest rout and not shortest rout taking the difference in speed innto consideration?

Area with slower movespeed can be for example stairs or swampy area

Its a top down 2D game like pokemon gameboy and i want to be able to move character in all possible directions in the 2D x/y plane. Within certain areas, when entering a new layer, I want it to modify movespeed for certain directions. For example vertically along the y-axis it will be half the movementspeed both upwards and downwards, while sideways horisontaly I want to keep normal movespeed. Then in the space between these two directions I want movespeed to change linearly from 1 to 0.5, depending on angle from each horizontal or vertical direction, for example in the angle between horizontal and vertical I want movespeed to be 75percent of normal movespeed.

This is what I got so far, however I imagine I have to add some if statements such as if on layer… do this, and make a specific ground layer for each movementspeed transformers with specific directions. Or I have to add a direction to specific layer and get the direction and use that as referance for the transformation.

unisng System.Collections;
using System.Collections.Generic;
usingUnityEngine;

public class PlayerMove : MonoBehaviour
{
public float speed;
private Vector2 targetPosition;

//Start is called before the first frame update
void Start()
{
targetPosition=new Vector2(0.0f,0.0f);
}

//Update is calle donce per frame
void Update()
{
if(Input.GetMouseButtonDown(0))
{
targetPosition=Input.mousePosition;
targetPosition=Camera.main.ScreenToWorldPoint(new Vector3(targetPosition.x, targetPosition.y, 0.0f));
}
this.transform.position=Vector2.MoveTowards(this.transform.position, targetPosition,speed*Time.deltaTime);
}
}

If this is possible, would it also be possible to make pathfinding take these changes in movespeed innto consideration when pickeng out the shortest/fastest rout? This is not that important, Shortest will work, even if its not the fastest.