RaycastHit2D.hit.normal not returning correct value

Im creating a characterphysics in unity using raycast, but im not getting the correct value from raycasting on a flat surface, the value should be = (0.0, 1.0) but it is (1.0, 0.0)

anyone have experiences similiar problem?
Code

hit = Physics2D.Raycast(new Vector2(x, y), velocity.normalized, velocity.magnitude+skin);   
            if (Physics2D.Raycast(new Vector2(x, y), velocity.normalized, velocity.magnitude+skin ))
            {
                if (i == 0 && 0.3f < hit.normal.y)
                {
                   
                    direction = Vector3.Cross(hit.normal, hit.collider.transform.forward);
                    newdir = direction * deltaX;
                }
                else
                {

                    if (grounded && 0 >= hit.normal.y)
                    {
                        Debug.Log("Land " + hit.normal + " " + velocity.normalized);
                        playerController.currentSpeed = 0;
                    }
                    newdir = new Vector2(0, deltaY);
                    
                }
                hited = true;
            }

        }

You need to check if the point you’re casting from is not inside the collider (this sometimes happens with the 2D physics, not sure why), as then the normal returned will be just opposite of your casted ray.

To check if your starting point is inside the collider use OverlapPoint function on the collider link text

if (hit.collider.OverlapPoint(origin)) {
    // ignore normal
}

Not sure it is your whole problem, but this:

 if (Physics2D.Raycast(new Vector2(x, y), velocity.normalized, velocity.magnitude+skin ))

is wrong.

A Physics2D.Raycast() returns a RaycastHit2D which is a structure. A struct cannot be null. So assuming you executed the code on the previous line, just check the collider:

if (hit.collider != null) {

I had the same kinds of problem. I have checked the object the ray hit by = Debug.Log(hit.collider), hit=(RaycastHit2D hit). It returns the collider of the object which is not supposed to collide, the object from which I am casting the ray. In start function I past the line below:

Physics2D.queriesStartInColliders = false;