I can't replicate your problem. The Stream Deck app always appears in the same location that it was when I last closed it. It never uses a "random" location.
Nonetheless, I will still help, and the first step in solving your problem is to get KM to launch a macro when the Stream Deck app is activated. I was able to achieve that as follows: (you will have to take extra steps to select "Elgato Stream Deck" by clicking on the "Other" button and locating it in your App folder.)

The next step is to move the window to the location you want.
The problem here is that KM doesn't recognize Stream Deck as a "window." From what I can see, Elgato has used special macOS options to make the window invisible to the GUI. Normally you would use something like this, but it won't work because Elgato has made a non-standard window:

However it should be possible using a different technique. The Stream Deck window is visible to the FindImage action, and you could use a different KM action to drag that window to your preferred location. Here's the code I created to solve your problem.

Of course, you will have to create these actions yourself manually, because my image capture will most likely not work for you. You have to create your own image capture of the multicoloured icon on the Stream Deck app.
And further, I couldn't replicate your problem, so this isn't even necessary.
Moreover, this is not the best way to solve this problem for any other app. If you are having this problem with any other app, then a different solution will work better.
You might want to contact Elgato and complain to them about the bad behaviour of their app.
Of course, my answers are right only 80% of the time, so maybe someone else will have a better solution or a better analysis for you.