I found the following Ghostty config can be used to get i3wm border around Ghostty (using i3wm with XFCE)

window-decoration = true
gtk-titlebar = false
gtk-adwaita = false

Related: With the release of 1.0.1 of Ghostty, there is an issue with border around Ghostty on Linux