I apologise if this is not the correct forum for asking this question.
I am making a GTK4 application in Python which can open .odt files. If a .odt file is opened with the application in the file manager (i.e. the path to a document is passed to the application as an argument in the CLI), the Gio.Application emits the “open” signal. The function attached to this signal is then given an array of GFiles which have the path to those files. But, since the GFile has the actual file path associated with it (/home/user/…) instead of /run/user/100… which is the case with files opened manually using Gtk.FileDialog, the application is unable to read this file from within the sandbox. I have added --file-forwarding to the desktop file but it does not help.
How do I access the contents of these GFiles from within the sandbox?