This is the selection edge (which is displayed with a marching ants effect):
If you want to keep it hidden, you will see that after unchecking the View > Show > Selection Edges menu option, the selection will re-appear when you select other region. This is because there is an option that automatically shows the selection edges when it’s modified, you can disable this behavior unchecking the Edit > Preferences > Selection > Automatically show selection edges after modifying the selection option: