How to pack an app if it request directory writable?

If an application request write some file in directory, then after packaging the app, the squashfs is read-only.So the app.appimage cant run.
it is usually close-source software.
so, I want to ask who to dead with this question?

If the software would be installed in the traditional way, e.g., to /usror /opt, then it would also be read-only for regular users. Hence well-behaved software will only attempt to write to $HOME which is writeable by the user.