Rama, Krishna, Brahma, Vishnu, and Mahesh (Shiva) are all mentioned in Gurbani. Krishna is spoken of 47 times in SGGS.
"The Gurmukhs are emancipated by the Lord. The Lord Krishna becomes the Gurmukh’s Companion. The Gurmukh finds the Merciful Lord. He is not found any other way. || 2 || He does not need to eat; His Hair is Wondrous and Beautiful; He is free of hate. Millions of people worship His Feet. He alone is a devotee, who becomes Gurmukh, whose heart is filled with the Lord, Har, Har." (ANG 98)
God in Guru Granth Sahib has been referred to by many names like Rama, Allah, Krishna,Gopal ,Hari,Sahib etc. However, when the reference is to a historical character(Avatar like the King 'Rama' or Sri Krishna of Dwarka), the difference is evident and has to be considered. So it is clear that at some places, the qualities of such historical Avatars (Rama, Krishna) have been praised, but at the same time the distinction between them and the True Formless Lord has been made.