It seems like pressing the “Play in Viewport” button once before hitting the “Edit Script” button creates all necessary Kode Studio project configuration files.
Strangely enough, the issue has been resolved after installation purge. Thanks for help, @Didier.
EDIT:
I stumbled upon this issue once more on different machine. This time I’m quite certain what is the cause of the problem. I was tinkering with Kha some time ago, thus I had Kode Studio and Haxe installed. It seems like some old Kode Studio setting was pointing to old Haxe installation, and this caused the problems with code completion (and other things). So, removing old Kode Studio completely (along with settings in User directory) solved the problem.
TL;DR
If you cannot make code completion working and was using Kode Studio before, make sure to remove Kode Studio settings directory in User folder.