Historically, whichever party holds the white house, that party loses congressional and senate seats during a president’s term/s. This is regardless of who is the opposition leaders in the House and Senate. They gain. Pelosi will be no different. Some out of power parties gain more, some less, but all gain.
Here is the congressional numbers at the beginning of each president term/s and the last year he left office.
Eisenhower 1952 48 senators, 221 House 1960 34 senators, 153 house
JFK/LBJ 1961 64 senators, 283 House, 1968 64 senators, 248 house
Nixon/Ford 1969 36 senators, 187 House, 1976 37 senators, 144 house
Carter 1977 61 senators, 291 house, 1980 58 senators, 277 house
Reagan 1981 53 senators, 192 house, 1988 45 senators, 177 house
Bush I 1989 45 senators, 175 house, 1992 44 senators, 167 house
Clinton 1993 57 senators, 258 house, 2000 45 senators, 211 house
Bush II 2001 50 senators, 221 house, 2008 49 senators, 198 house
Obama 2009 59 senators, 256 house, 46 senators, 188 house
Trump 2017 52 senators, 240 house, ??????????????
Eisenhower lost 14 senators and 68 house seats over his two terms
JFK/LBJ, I included both as JFK was assassinated and this spans two terms, No change in senators, but a net loss of 35 house seats.
Nixon/Ford again I included both as Nixon resigned and Ford replaced him, abet unelected. They actually gained one senate seat, but loss 43 house seats.
Carter lost 3 senate seats and 14 house seats over his one term.
Reagan lost 8 senate seats and 15 house seats.
Bush the First, lost one senate seat and 8 house seats over his one term.
Clinton was one of the bigger losers like IKE, he lost 12 senators and 47 house seats.
Bush the second lost one senate seat and 23 house seat
Obama lost 13 senators and 68 house seats.
Trump unknown.