Use Bootstrap tabs inside a modal
Give each tab pane its own ID and check the active tab each time the modal opens.
When several dialogs reuse a tabbed layout, duplicate IDs can send a tab trigger to the wrong pane. Prefix IDs with the dialog ID and point each trigger’s target and accessibility attributes to its pane.
Decide where the dialog reopens
Keep the last active tab if the reader is returning to the same task. For a fresh task, activate the intended tab on open using the tab API for your version. Test closing with Escape and reopening from the keyboard.