I have exported quite a few books from ID4 to epub and have not had this problem. Are you also embedding fonts? (I don't.)
Without any data (such as sample code) I can't be much help other than to say that it
should work.
You may find some helpful information in this thread:
https://www.mobileread.com/forums/showthread.php?t=94157
especially post # 13