I had always been taught that there should be no gap between Shema and Shmoneh Esreh, to the point where we don't even answer Amen. Yet on Pesach we add Brach Dodi.
Why is this permissible, and would it have made a difference to have it included either before Shma or the beginning of the repetition (as other piyutim are), as those placements do not create a gap in the proximity of Shema and Shmoneh Esrehe?