ضمن تشکر از ایمان بیات به خاطر جواب درستشون (با رای مثبت) یک راه حل ساده تر به کمک دستور زیر است:
\tikzstyle{betabox}=[append after command={
\pgfextra
\draw [sharp corners, draw=red,very thick,fill=orange!50]%
(\tikzlastnode.west)%
[rounded corners=4pt] |- (\tikzlastnode.north)%
[rounded corners=0pt] -| (\tikzlastnode.east)%
[rounded corners=4pt] |- (\tikzlastnode.south)%
[rounded corners=0pt] -| (\tikzlastnode.west);
\endpgfextra }]
بنابراین کد کامل به این صورت است:
\documentclass[border=5pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.misc, positioning}
\tikzstyle{alphabox} = [draw=red, fill=orange!50, very thick,
rectangle, rounded corners]
\tikzstyle{betabox}=[append after command={
\pgfextra
\draw [sharp corners, draw=red,very thick,fill=orange!50]%
(\tikzlastnode.west)%
[rounded corners=4pt] |- (\tikzlastnode.north)%
[rounded corners=0pt] -| (\tikzlastnode.east)%
[rounded corners=4pt] |- (\tikzlastnode.south)%
[rounded corners=0pt] -| (\tikzlastnode.west);
\endpgfextra }]
\begin{document}
\begin{tikzpicture}
\node (A) [alphabox] {It is A};
\node (B) [alphabox][left=of A,draw, rounded rectangle, rounded rectangle west arc=0pt] {It is B};
\node (C)[alphabox,left=of B,draw, rounded rectangle,rounded rectangle east arc=0pt] {It is C};
\node[betabox] [left= of C, very thick]
(D){It is D};
\end{tikzpicture}
\end{document}
خروجی هم به این شکله: