I tested it on my Windows 10 machine, but the stroke didn't disappear. So I checked to see if there was some sort of bug reported on Uservoice. I may have found the answer. It seems that there is a bug (the reported bug says two fills, but I tested it with two strokes and it disappears when you draw inside).
So to fix it, select your shape and open your Appearance panel. See if there is more than one stroke applied. If so, remove one, and then you should be able to draw inside and retain the stroke.