Firstly, you need to be careful to use modeless form/window: in most cases one only use it for showing information in application context; if the information shown on the form/window is specific document (for example, the active drawing in AutoCAD) related, because user can switch to another document while this form/window shows. In this case, you need to either refresh the content on the form with newly activated document, or you need to have the form/window closed automatically.
In general, for modeless form/window/paletteset, only a static/Shared instance is created, something like:
<CommandClass> _
Public MyCommandClass
Private Shared _floatWindow As MainWindow=Nothing
<CommandMethod("DoSomthing", CommandFlags.Session>
Public Shared Sub DoSomethingWithFloatForm()
If _floatWindow Is Nothing Then
_floatWindow=New MainWindow
End If
Application.ShowModelessWindow(_floatWidnow)
End Sub
End Class
You also need to handle the window's Closing event, where you cancel the closing, and set the window's Visible/Visibility property to False/Hide, so that when user clicks the "x" on the window, it is not closed, but becomes hidden instead.
You can also use multiple floating forms/windows with each related to specific open drawing. This article might be helpful on this regard:
https://drive-cad-with-code.blogspot.com/2014/02/showing-and-closing-modeless-formdialog.html
HTH