It might obviously go in a lot of ways, but the key issue is that this male Matilda (let’s call him Atto, the name of the first of the Canossa house) would still be just six years old when his father dies in 1052, and anyway would not be the heir since Federico is the older son.
This means that Beatrice of Bar still marries Godfrey of Lorraine against the wish of Henry III, who rides into Italy in 1053. Federico should die on schedule in 1053, and Beatrice and young Atto will still be taken hostages to Germany.
We might see some changes when Atto comes of age (1061): Henry IV is still a minor at this time, so depending on the willingness of Beatrice to leave the reins of power and the attitude of Godfrey Atto might be less subjugated to the will of his mother and stepfather (from what we know of OTL, Matilda was quite unassuming during the 1060s and never acted on her own). This is going to have a major impact on his marital choice, but it is not a given that he’ll be able to avoid a bride from Lorraine in consideration of the extensive allodial possessions his mother holds there. I don’t know which lorenaise high-born lady might be available but I’m pretty sure entssomeone will be. OTOH Atto is likely to be much more hands on in the governing of his fiefs (which btw are part imperial, part papal and part allodial and will require a lot of delicate balancing acts). Will Henry IV and Atto be friends? It’s quite possible, as it is possible that Atto will not be under the influence of Hildebrand of Soana as much as Matilda was: it is also within the realm of possibilities that Hildebrand will not even be crowned pope as Gregory VII. However Atto is the greatest lord in Italy, effectively controlling both the Po and the Appennine passes toward Rome, and through his mother he has significant influence and allies in Lorraine: no emperor may be completely comfortable having such powerful vassal effectively out of his direct control. As far as Atto is concerned, he would certainly see the opportunity of playing the emperor against the pope, and even extending his control to Rome. There are plenty of possible developments, including the likelihood of a fight over ecclesiastical investitures and the fact that Lombardy and Tuscany are strongholds of Pataria, a pauperist religious movement advocating for a major reform of the church.