When you click inside an ImGui window, that click should be "consumed" by ImGUI and not delivered to the app (ie: IsMouseButtonPressed() should return false after that). ImGUI uses the flag ...
Imgui constructors should be optional, looks like a imgui bug and you should report it to imgui repo. The C++ version works just fine, so I don't think it's core ImGui issue. I think the main problem ...