Sir these are the sources in which it is clearly stated that Mughals were defeated and retreated in the second battle of Anandpur 

 Johar, Surinder Singh (1998). Holy Sikh shrines. New Delhi: M D Publications. p. 46. ISBN 978-81-7533-073-3. OCLC 44703461.
3. Singh, Bhagat Lakshman (1995). Short Sketch of the Life and Work of Guru Govind Singh, The Tenth and Last Guru. Laurier Books Ltd. /AES. p. 96. ISBN 978-81-206-0576-3. OCLC 55854929.
4. Singh, Prithi Pal (2007). The History of Sikh Gurus. Lotus Books. p. 146. ISBN 978-81-8382-075-2.
5. Singh, Dalip (1992). Guru Gobind Singh and Khalsa Discipline. Amritsar: Singh Bros. p. 256. ISBN 978-81-7205-071-9. OCLC 28583123.