Answer
Pragma autonomous_transaction runs that PL/SQL block in a separate, independent transaction from the main save transaction the Custom Event fired from — since the record you're querying for hasn't been committed by the still-in-progress main transaction yet, the autonomous block's own query genuinely finds no matching rows to loop over, even though the same query works fine once run standalone against already-committed data. Removing the Pragma autonomous_transaction (so the block runs in the same transaction context as the save) resolves this, though it changes the transactional semantics of the block — worth confirming that's actually the intended behavior for your specific use case before relying on it.