A* graph search heuristicfor pathfinding A* needs a consistent heuristic to work on a graph.

So I'm not sure if the heuristic of a straight line (bird flight) can be used.

For example: the costs to travel to a neighbors node is always positive.

              GOAL

 --------------------
 |                  |
 |      START       |
 |                  |    where to stripes are obstacles.


Am I correct that this the proposed heuristic isn't consistent here as it has to travel away from the goal first?

Is there a good heuristic for this kind of situation?
Or should I keep it with Dijkstra a forget about A*?
There is nothing wrong with the heuristic function you suggest. Note what the consistency condition actually says: If you have nodes $n_1,n_2$, and the cost of traveling from $n_1$ to $n_2$ is $c$, then the heuristic values need to satisfy a triangle condition: $h(n_1)$ must not be more than $h(n_2)+c$. It is ok for $h$ to underestimate the distance from a node, as it does for your start node (though obviously, the performance of the algorithm can suffer in this case).