How to avoid hole

Can anyone suggest a way to avoid getting this hole which is not clear on photo? I’m knitting sideways mittens which call for Cast off 9sts and cast on 6sts to start the thumb. When I cast on the 6sts I knit into the back of the 6+ next 2 but get a little hole the same happens when I finish the thumb -Cast off 6sts and cast on 9sts

You might try casting off to the last stitch required for cast off. Instead of knitting that stitch, slip it to the right needle and lift the stitch on the right needle over and off.
The cable cast on seems to leave only the smallest trace of a hole. I tried both techniques and they seem to work.

Thank you I’ll give it a try, doing matching hats & scarves now