The right or wrong of secession has nothing to do with the question. The question is, was the Confederacy a sovereign nation? All nations have to be recognized by others to be considered sovereign. That's the way it works.
The Confederacy was bound by the same rules as all other countries of the earth. We can't exempt it just because we want to.