Getting a 404 'Not Found' error when importing saved objects

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

I am running OpenSearch 2.11.1 on Linux

Describe the issue:
I have some python code that runs without any problems most of the time. It processes a list of files that contain saved object definitions and imports them into a tenant. The code first checks to see if the object exists with a requests.get then, if so, it does a requests.post to update it, if not, it does a requests.put to create it.

Once is a while the put returns a 404 ‘not found’ error which is weird since we are creating the object not looking for it. It is never on the same object and, if I rerun the process, it will process all the objects without an error.

At first I thought it might be the python requests library returning before the import is complete, but I verified that this library is already coded to wait for the request to complete.

Is there another reason I am seeing a 404 from a PUT request every once in a while?

Configuration:
OpenSearch 2.11.1 running with security plugin in a docker container.

Relevant Logs or Screenshots: