### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Ubuntu 23.04 23.04 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3070 Ti (nvidia; 535.54.03) - 12th Gen Intel(R) Core(TM) i9-12900F (24 Threads)

### Issue description

As per the issue title - in a 3D scene which contains a Control node, clicking that node will switch to the 2D view and allow you to edit the controls visually. Likewise, clicking a node that derives from Node3D will switch back to the 3D view so you can continue to visually work with the selected nodes.

When going into the script window and clicking the button to open the script into a floating window, however, the aforementioned actions no longer work. Closing the script window so it is no longer floating will restore the functionality.

### Steps to reproduce

1. Create a 3D scene
2. Add a Node3D
3. Add a Control
4. Click the Node3D node and see that the editor shows the 3D view
5. Click the Control and see that the editor shows the 2D view
6. Go to the Script tab and click the button to open it as a floating window
7. Repeat steps 4 and 5 to see that either the 3D view or 2D view will remain the active view regardless of which node is selected
8. Close the floating script window and repeat steps 4 and 5 to see they are now working again

### Minimal reproduction project

N/A
void _scene_saved_callback(const String &p_path);
	bool open_textfile_after_create = true;
	bool trim_trailing_whitespace_on_save;
	bool convert_indent_on_save;
	void _goto_script_line2(int p_line);
	void _goto_script_line(Ref<RefCounted> p_script, int p_line);
	void _set_execution(Ref<RefCounted> p_script, int p_line);
	void _clear_execution(Ref<RefCounted> p_script);
	void _breaked(bool p_breaked, bool p_can_debug);
	void _script_created(Ref<Script> p_script);
	void _set_breakpoint(Ref<RefCounted> p_scrpt, int p_line, bool p_enabled);
	void _clear_breakpoints();
	Array _get_cached_breakpoints_for_script(const String &p_path) const;
	ScriptEditorBase *_get_current_editor() const;
	TypedArray<ScriptEditorBase> _get_open_script_editors() const;
	Ref<ConfigFile> script_editor_cache;
	void _save_editor_state(ScriptEditorBase *p_editor);
	void _save_layout();
	void _editor_settings_changed();
	void _filesystem_changed();
	void _files_moved(const String &p_old_file, const String &p_new_file);
	void _file_removed(const String &p_file);
	void _autosave_scripts();
	void _update_autosave_timer();
	void _update_members_overview_visibility();
	void _update_members_overview();
	void _toggle_members_overview_alpha_sort(bool p_alphabetic_sort);
	void _filter_scripts_text_changed(const String &p_newtext);
	void _filter_methods_text_changed(const String &p_newtext);
	void _update_script_names();