When you import EPUB files into Apple Books, the application processes and re-packages them, even if the original files were Digital Rights Management (DRM) free. This modification adds DRM protection and other proprietary elements, making these files incompatible with other e-readers and applications.
Epubs can be found in iCloud Drive/Books/ May be easier to search for a book name in Finder, as the Books folder isn't usually visible.
This solution came from a reddit post which attributed back to this post. Essentially the epub is a directory which you cd into, then re-zip back as an epub:
cd /path/to/my/book.epub/
zip -rX ../book.epub mimetype META-INF/ OEBPS/ *
The script reprocess_epubs.sh is a shell script designed to be run inside a folder which contains epub directories. It zips each one back up as an epub and saves into a directory processed_epubs.
Script has been tested and used successfully a few times, no responsibility taken for any problems caused...