MZ Custom window pops up at the beggining!

Hello! I added this custom window in the battle scene that shows the actor's status when selecting a skill or item. The window works perfectly, however, there is this minor issue when the battle scene starts... The window pops up for a second before the party command window opens. How can I fix this?
1681266470727.png
I would start by making sure that the initialize prototype function of your custom window is calling
Code:
this.hide();
If theres some other strange logic thats opening it after the window initializes you can always call hide it in on battle start like so

Code:
let __override_Scene_Battle_prototype_start = Scene_Battle.prototype.start;
Scene_Battle.prototype.start = function() {
    __override_Scene_Battle_prototype_start.call(this);
    this.My_cool_custom_window_that_I_stored_a_reference_to_on_the_scene_object.hide();
}
Thank you, the this.hide(); solution worked!
Moved to: Javascript/Plugin Support

Original thread: https://forums.rpgmakerweb.com/threads/custom-window-pops-up-at-the-beggining.156603/