This is possible not only by creating a closing marker before opening, but also by indicating the level of addition in the markers.
{{{1 Fold you are closing. Inserting the closing marker below would not open the next fold. }}} {{{1 Closed fold. }}}
In this case, the fold level helps Vim find the appropriate closing marker, rather than trying the one that closes the next fold.
source share