According to this answer, the Bellman-Ford algorithm doesn't work when an undirected graph contains negative weight edges since any edge with negative weight forms a negative cycle, and the distances to all vertices in a negative cycle, as well as the distances to the vertices reachable from this cycle, are not defined. So in the all-pairs shortest path problem, can we say the Floyd–Warshall algorithm also doesn't work on an undirected graph contains negative weight edges for the same reason?
Perhaps it is useful to be more precise about what is meant by "doesn't work". If the directed graph contains a cycle of negative weight, then the notion of shortest path is not well-defined. Therefore, it makes no sense to run a shortest-path algorithm on such a graph. There's no hope for any algorithm to output the shortest path in such a graph, because there is no shortest path.
If you have an undirected graph with negative-weight edges, and you convert it to a directed graph in the obvious way, you'll end up with a directed graph that contains negative-weight cycles. Consequently, no shortest path algorithm has any hope of success at finding shortest paths: there is no directed path (in the directed graph). It doesn't matter what algorithm you are considering using.
Basically, the conversion from undirected graph to directed graph, in shortest path problems, is only correct if all weights are non-negative. If all edge weights are non-negative, then the shortest path in the undirected graph corresponds to the shortest path in the directed graph you obtain in this way. However, if the undirected graph has negative-weight edges, then there is no longer any such correspondence, so the conversion is not useful.