You mean in places like Kentucky, Missouri, Delaware, and Maryland were slavery existed. I don't remember those States seceding. Do you?
The war ended in April, 1865. The 13th amendment was officially ratified by 3/4 of the states at that time in December, 1865.
Kentucky, a Union state, had slaveholders that opposed the abolition of slavery and it existed there long after the war. It didn't officially ratify the 13th amendment until 1976.
Missouri officially ended slavery in January, 1865. It was exempt from Lincoln's Emancipation Proclamation since it never left the union. Interesting how those that condemned the Confederates for owning slaves were so willing to tolerate the slavery of those that didn't leave. Does that mean slavery in those states wasn't bad?
Delaware voted to reject the 13th amendment in February, 1865. It was not until December, 1865 when 3/4 of the OTHER states has voted in favor of it did slavery end in Delaware. Delaware didn't officially ratify it until 1901.
Maryland had slavery until about 4 months prior to the end of the war. While they didn't secede, many of the citizens of Maryland including almost all of the slaveholders, had sympathy for the Confederate states. The Emancipation Proclamation didn't apply to slavery there either proving that the claims about the war being based on slavery were nothing more than a lie.