Intellij dialog windows close immediately

Output of awesome --version:

awesome v4.2 (Human after all)
 • Compiled against Lua 5.3.4 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.5
 • LGI version: 0.9.2

How to reproduce the issue:

  1. Install intellij
  2. Use the find file dialog (ctrl + shift + n)

Actual result:
Focus gets lost and the dialog window closes. Whether this happens in non deterministic.

Expected result:
Find file dialog opens and gets focus and stays open.

Related issues
#889
https://youtrack.jetbrains.com/issue/IDEA-155759
#255

Description
I reopened this since it was supposedly fixed. I'm still getting it.
Using the default rc.lua helped for a few minutes. But then it behaved the same as always.