### 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
ConfirmationDialog *disk_changed = nullptr;
	bool restoring_layout;
	String _get_debug_tooltip(const String &p_text, Node *_se);
	void _resave_scripts(const String &p_str);
	bool _test_script_times_on_disk(Ref<Resource> p_for_script = Ref<Resource>());
	void _add_recent_script(String p_path);
	void _update_recent_scripts();
	void _open_recent_script(int p_idx);
	void _show_error_dialog(String p_path);
	void _close_tab(int p_idx, bool p_save = true, bool p_history_back = true);
	void _update_find_replace_bar();
	void _close_current_tab(bool p_save = true);
	void _close_discard_current_tab(const String &p_str);
	void _close_docs_tab();
	void _close_other_tabs();
	void _close_all_tabs();
	void _queue_close_tabs();
	void _copy_script_path();
	void _ask_close_current_unsaved_tab(ScriptEditorBase *current);
	bool grab_focus_block;
	bool pending_auto_reload;
	bool auto_reload_running_scripts;
	void _trigger_live_script_reload();
	void _live_auto_reload_running_scripts();
	void _update_selected_editor_menu();
	EditorScriptCodeCompletionCache *completion_cache = nullptr;
	void _editor_stop();
	int edit_pass;
	void _add_callback(Object *p_obj, const String &p_function, const PackedStringArray &p_args);
	void _res_saved_callback(const Ref<Resource> &p_res);