E.,
I am very concerned for your little girl, and they can be easily frightened around this age, but it sounds to me like something is wrong.
Please RUN with your little girl to a good counselor - someone with at least a Master's Degree. Since your ex is a registered sex offender, and sounds like he could be a pedafile, your daughter is in great danger. You will need to let the counselor's office know this when you try to make an appointment, otherwise you won't get in for weeks.
I am assuming your ex's visitations are supervised...if so, please contact that supervising party and let them know something is wrong - and confirm that they have been watching the visits properly - but be vague if that supervising person is part of the local government system (will county), I live near you.
Also be careful of whatever counselors, teachers etc are at your daughter's school -- if they suspect there has been inappropriate contact with your ex and your little girl they automatically call DCFS - and then your life will become an uncontrollable nightmare.
Is it possible that your daughter thinks you might move away without her? At this age, they can think strange things like that - this would explain why she only acts that way at home. Maybe you could try talking with her and reassuring her that you are moving together.
Also I am suspicious that your ex might try to take your daughter before you move out of state - and perhaps she overheard him saying something about that - or just senses it. I am assuming you have tried to deny visitation, I know how difficult that can be -- but you know he is still obligated to pay child support even if he is denied the right to see your daughter, right? a close friend of mine went through something similar to this years ago, she did not recognize the red flags that her kids were being abused sexually by their stepfather - much damage was done; please err on the side of extreme caution and protect your little girl.
I know what it's like to be a single mother, I raised my oldest daughter on my own before marrying my husband. I wish you all the best. Let me know how it turns out, ok?
W.