Wonky stitch when switch from knit to purl

I’m making a square that is stockinette on the left half and reverse stockinette on the right half. (Does that even make sense?) When I change from knitting to purling the last knit stitch is somewhat stretched. Is there a way to avoid this?

It is not uncommon to have this problem. Take a look at this webpage; her technique helped me a lot.

Thanks so much! I’ll try that.