Tested in latest Chrome and FF:

If you have multiple PDF files embedded as Iframe (via viewer.html) and at least one of them is password protected, the browser automatically jumps to the (first) iframe that shows the password prompt.

Imho, the iframe shouldn't modify the behavior of it's parent in any way.

See https://support.softcreatr.com/thread/4360-pdf-test/ for a demo.
import { PDFAttachmentViewer } from "./pdf_attachment_viewer.js";
import { PDFDocumentProperties } from "./pdf_document_properties.js";
import { PDFFindBar } from "./pdf_find_bar.js";
import { PDFFindController } from "./pdf_find_controller.js";
import { PDFHistory } from "./pdf_history.js";
import { PDFLayerViewer } from "./pdf_layer_viewer.js";
import { PDFLinkService } from "./pdf_link_service.js";
import { PDFOutlineViewer } from "./pdf_outline_viewer.js";
import { PDFPresentationMode } from "./pdf_presentation_mode.js";
import { PDFSidebar } from "./pdf_sidebar.js";
import { PDFSidebarResizer } from "./pdf_sidebar_resizer.js";
import { PDFThumbnailViewer } from "./pdf_thumbnail_viewer.js";
import { PDFViewer } from "./pdf_viewer.js";
import { SecondaryToolbar } from "./secondary_toolbar.js";
import { Toolbar } from "./toolbar.js";
import { viewerCompatibilityParams } from "./viewer_compatibility.js";
import { ViewHistory } from "./view_history.js";
const DEFAULT_SCALE_DELTA = 1.1;
const DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; 
const FORCE_PAGES_LOADED_TIMEOUT = 10000; 
const WHEEL_ZOOM_DISABLED_TIMEOUT = 1000; 
const ENABLE_PERMISSIONS_CLASS = "enablePermissions";
const ViewOnLoad = {
  UNKNOWN: -1,
  PREVIOUS: 0, 
  INITIAL: 1,
};
const ViewerCssTheme = {
  AUTOMATIC: 0, 
  LIGHT: 1,