You probably need to auth
Kind 1 event gets published but cannot find Kind 4 event on that relay published by publish_dm_event()
What could be the reason? Here's the python script if you want to test: https://pastebin.com/raw/dNFNB9XF
You will have to clone [python-nostr](https://github.com/jeffthibault/python-nostr) and save this python script inside python-nostr directory to run it

Discussion
No. The reason I couldn't find the event on relay is because it never got published. Connection to relay was closed after publishing first event. So removing this line after first sleep fixes the issue:
`relay_manager.close_all_relay_connections()`
It was just created and event id was printed.