We can attempt to answer the first part of this question regarding Bohemia, which might help with the second part. However, the difference between the two would seem to be a key factor – one being an assortment of pagan tribes sometimes violently opposed to Christianity on the doorstep of Germany, the other a Christian duchy of the Holy Roman Empire with fairly strong ties to Germany for hundreds of years before the major German expansion efforts of the 12th century.
But even when focusing solely on Bohemia, asking why something did not happen – that is, the Germanization of Bohemia – is always rather tricky, and it is tempting to counter with another question. In this case, why should it happen at all in the first place? It seems your notion of the Holy Roman Empire is slightly flawed.
The Holy Roman Empire was not some homogenized, purely German entity, a centralized realm with a sole, absolutist monarch at its head, an emperor who would literally command those below him. Nor was it a state which would somehow simply “absorb” its neighbors, as you put it.
The Empire included various realms in modern-day Italy, France, the Low Countries, and the like, and for centuries, these retained their cultures, languages, and customs – assuming this is what you mean by “(Slavic) heritage”. Indeed, the internal divisions and differences between the various German states themselves have not disappeared throughout the Empire’s existence, they have not been completely smoothed over or molded into some singular “Imperial” culture. So why would the Duchy and later the Kingdom of Bohemia be any different, especially when you consider their historical ties with their western neighbors?
As early as in the 8th century the Czechs have had contact with the Franks to the west. Although at first clashing to apparently no noteworthy outcomes, a later victory by Pippin, son of Charlemagne, made the local people pay tribute to the Franks. The rise of Great Moravia, which also included the Bohemian lands, in the following century saw further interaction with the Franks including military engagements as well as periods of peace or paying tribute.
More importantly, it also saw Christianity adopted throughout the realm. In 845 fourteen Czech nobles were baptized in Regensburg, and only a few years later prince Rastislav asked for missionaries to help spread the Christian faith, although he had also done so to undermine Frankish influence.
Unsuccessful with his request in Rome, he turned to the emperor Michael III in Constantinople, who was more receptive. Constantine and Methodius then started their efforts in 862, a full century before Otto I was crowned Holy Roman Emperor, and well before the major push of German colonization in the 12th century, the so-called Ostsiedlung.
In addition to religious ties, the political ties between the Duchy of Bohemia and the Germans would also grow deeper after the decline of Great Moravia. Two most notable early examples being duke Boleslav I swearing fealty to Otto the Great in 950, the same Otto who would become Emperor a short while later, and even more importantly in 1004 with duke Jaromir promising to hold Bohemia as a vassal of Henry II following his help in a series of conflicts to regain the throne.
What followed in the 11th and 12th centuries was Czech dukes getting involved in the affairs of the Empire even more, with Vratislav II and later Vladislav II securing non-hereditary royal titles on two occasions for their support to Emperors Henry IV in 1085 and Frederick Barbarossa in 1158, respectively.
A hereditary title of the Kingdom of Bohemia was secured between 1198 and 1212 by Premysl Ottokar I when he took advantage of the conflict between Philip, King of the Romans, and his rival and future Emperor, Otto IV, and had both and pope Innocent III acknowledge him as king, having yet another Emperor Frederick II confirm everything with the Golden Bull of Sicily in 1212.
So as you can see, by the time the Polabian Slavs had to suffer the brunt of German expansion from roughly the 11th century onward, Bohemia was a well-established part of the Holy Roman Empire, sharing its faith, its duke or king is a vassal of the Emperor. That being said, Bohemia did experience the aforementioned Ostsiedlung as well.
However, unlike the forced Christianization, Germanization, and military campaigns against the Polabian Slavs, German colonists came to Bohemia at the request and invitation of local rulers. They settled in various and at the time mostly uninhabited regions, beginning the history of a sizeable minority of Germans in Bohemia that would last until the 20th century.