Below I added the "code" of a tikzpicture and the top part works as intended. However, even though the "code" is written exactly the same, the bottom part does not work as intended. The two outer arrows do not seem to show properly. They should, just like the top part, leave the left node at the middle of the north and south edges and enter the node on the right from the middle of the west edge. While the upper arrow of these two does seem to leave the left node as intended, the node on the right is entered from the south rather than the west. The lower arrow does not leave nor enter the nodes as supposed to. It looks like the lower arrow is leave the node on the left from the north (but first goes through the node) and then enters the node on the right from the south.
I have been checking my "code" over and over again and also been looking on this forum for hours, but all proposed solutions to somewhat related problems have not solved this specific issue. Therefore, I dearly hope that you can help me out.
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{changepage}
\begin{document}
\begin{figure}[h]
\centering
\begin{adjustwidth}{-1.7cm}{}
\begin{tikzpicture}[
cur_state/.style={rectangle, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=blue!30},
new_state/.style={rectangle, rounded corners, minimum width=60mm, minimum height=1cm,text centered, draw=black, fill=red!30},
state/.style={rectangle, minimum width=3cm, minimum height=1cm,text centered},
empty_block/.style={rectangle, minimum width=3cm, minimum height=0cm,text centered},
node distance = 0cm,
auto]
%Drawing of the box and dashed line in middle
\draw[ultra thick] (-6,3.5) rectangle (11,-10);
\draw[dashed] (-6,-3.25) -- (11,-3.25);
% Top left
\node (sk) [cur_state] {top,left};
% Top right Top
\node (sk0) [new_state, above right=12.5mm and 30mm of sk] {top,right,1};
\node (sk1) [new_state,above right=-2.5mm and 30mm of sk] {top,right,2};
% Top right bottom
\node (sk2) [new_state, below right=-2.5mm and 30mm of sk] {top,right,3};
\node (sk3) [new_state, below right=12.5mm and 30mm of sk] {top,right,4};
% Bottom left
\node (sK) [cur_state, below=55mm of sk] {bottom,left};
% Bottom right top
\node (sK0) [new_state, above right=12.5mm and 30mm of sK] {bottom,right,1};
\node (sK1) [new_state,above right=-2.5mm and 30mm of sK] {bottom,right,2};
% Bottom right bottom
\node (sK2) [new_state, below right=-2.5mm and 30mm of sK] {bottom,right,3};
\node (sK3) [new_state, below right=12.5mm and 30mm of sK] {bottom,right,4};
%Titles above:
\node (s') [state, above=6mm of sk0] {Right title};
\node (s) [state, left=40mm of s'] {Left title};
% Titles left:
\node(k<K) [state, above left=-7.5mm and 5mm of sk] {Top title};
\node(k_K) [state, above left=-7.5mm and 5mm of sK] {Bottom title};
% Arrows top part
\draw[->, thick] (sk) |- node[above] {$1 - \sum_{i=1}^{3} p_i$} ++ (sk0);
\draw[->, thick] (sk) -- node[above] {$p_1$} ++ (sk1);
\draw[->, thick] (sk) -- node[below] {$p_2$} ++ (sk2);
\draw[->, thick] (sk) |- node[below] {$p_3$} ++ (sk3);
% Arrows bottom part
\draw[->, thick] (sK) |- node[above] {$1 - \sum_{i=1}^{3} p_i$} ++ (sK0);
\draw[->, thick] (sK) -- node[above] {$p_1$} ++ (sK1);
\draw[->, thick] (sK) -- node[below] {$p_2$} ++ (sK2);
\draw[->, thick] (sK) |- node[below] {$p_3$} ++ (sK3);
\end{tikzpicture}
\end{adjustwidth}
\caption{Abc} \label{fig:transitions}
\end{figure}
\end{document}