Determinant formula for the octagon form factor in $\mathcal{N}$=4 SYM