Well, you started the statement under the premise that the shotgun is longer and heavier, which need not necessarily be the case.
Not necessarily the case but often it is. If one is seriously concerned with this it is very easy to get a carbine that is still a very practical weapon and yet much smaller and lighter than a shotgun I would consider well suited to defensive use.
You can get a carbine to be modestly shorter and certainly to weigh less, but that's something that you have to actively work at to achieve.
Actually you can get one that is much shorter with no active work other than selecting and buying such a gun. For example my AUG carbine (the 16" barreled version rather than the 20" rifle) is less than 29" with a flash hider. An FS2000 is a touch over 29" OAL with its flash hider. 18" coach guns tend to be around 34.5” OAL. A 18.5" 870 is around 38.5" OAL.
If we start taking about SBRs and SBS then it is very easy to have carbines that weigh 5.5 Lbs and are 29.5" OAL. One can have an AR like that very easily with a 10.5 barrel. The MP5, which I have some trigger time on weighs about 6 lbs and is probably 27-28" OAL. About as short as I'd care to go with a tube fed SBS is a 12" barrel. Shorter than that and you likely will have only 3 rounds in the tube as well as big fireballs. That is a gun that is still 32" or so long.
As to weight my lightest carbine, which is not an SBR, and is chambered in a serviceable caliber, weighs 4 Lbs unloaded, carries more than 30 rounds and is 29.5" OAL. While a shotgun offers notably better terminal ballistics, it is not going to be smaller or lighter and still be useful weapon.
It is true that in given cases shotguns may be both lighter and even smaller than carbines. However, the smallest and lightest usable carbines are smaller and lighter than the smallest and lightest usable shotguns. Furthermore the lighter those shotguns get they tend to have more felt recoil, slower followups etc.
The pistol-grip and magwell of a flattop AR15 with optic, for example, conspire with the balance point of the carbine make it much more difficult to carry one-handed than the average shotgun.
Last time I checked the carbine universe consisted of a great many more weapons than the AR-15. In fact there are a great many carbines that do not even have pistol grips. What is the average shotgun? There are many many shotguns that have not only pistol grips but an 18.5" barrel and a mag tube full of shells out in front affecting the balance point. There is such much variation in shotguns that I'm not sure we can make meaningful comparisons without citing specific guns.