Which browser is detected when using Edge in IE compatibility mode?

yes its is determined by the agent that gets injected on user page when the page is loaded. The js agent sends data back to Dynatrce base on index type where it can differentiate edge based on chromium engine (latest one know as edge)  or IE engine.