First of all let's put some basic concepts on WebCenter Portal Elastic Search - WebCenter Content Integration.
Oracle WebCenter Content has its own indexing mechanism based on Oracle Text Search that updates the indexes when a Content is updated or modified.
Oracle WebCenter Portal Documents Task Flow makes use of RIDC API and relies on the Oracle WebCenter Content indexed information.
Oracle WebCenter Portal Search relies on Elastic Search which creates its own index of Documents stored in Oracle WebCenter Content (totally apart of the WCC - Oracle Text Search)
As you may know already, Elastic Search indexing happens from the configuration you established from Oracle WebCenter Portal Admin Console (it can happen periodically or you can trigger manually the indexation).
What does it mean? The changes you are making into your Documents Security Metadata is not reflected directly in Elastic Search results as the indexer must run to refresh the indexed content.
Taking the assumption you are re-indexing when changing the security of the document, let's focus on your issue.
I made a test:
- Created a Public Portal with a Page with access for Public
- Created a Enterprise Library in WebCenter Content (out of the Portal Enteprirse Library folder) for Public Documents setting up Public Security Group and empty Account
- Added a File into the Public Documents Enterprise Library / Folder.
- Re-indexed Elastic Search
- Made a Search and the document is available for public users.
To summary my above comments. Put your documents within a Enteprise Library or Folder with Public Security Group with no account involved.
In addition, what we did for this use case in a previous client is to build an hybrid solution WCC - Oracle Document Cloud.
You can create in Document Manager folders and share documents with the Cloud variant for Public access.