  We consider a model describing Bose-Josephson junction (BJJ) coupled to a
single bosonic mode exhibiting quantum phase transition (QPT). Onset of chaos
above QPT is observed from semiclassical dynamics as well from spectral
statistics. Based on entanglement entropy we analyze the ergodic behavior of
eigenstates with increasing energy density which also reveals the influence of
dynamical steady state known as $\pi$-mode on it. We identify the imprint of
unstable $\pi$-oscillation as many body quantum scar (MBQS), which leads to the
deviation from ergodicity and quantify the degree of scarring. Persistence of
phase coherence in nonequilibrium dynamics of such initial state corresponding
to the $\pi$-mode is an observable signature of MBQS which has relevance in
experiments on BJJ.
