The difference between a manufactured home and a modular home is in the actual building process / materials and building inspections. You can have the same identical house / floor plan side by side and not tell the difference. However, you will pay anywhere from $10-20k more for the "modular" home.
This costs buys you "upgraded" construction materials: 2x10 floor joists vs. 2x6, 2x4 roof trusses vs. 2x2 (or combination), full residential wiring done to national electric code, full residential plumbing done to plumbing code. Full drywall. The building process goes down the same assembly line, however the local county inspections that would take place at a site built house (framing, elec., plumbing, insulation, hvac, etc... all get done at the factory by the same local inspectors.
The "manufactured" home only gets one inspection, done by a HUD in-house inspector, at the end of the assembly line. HUD requirements are the bare minimum. Staples vs. nails, #3 graded lumber vs. #2 and better, 14 g wire on big circuits, cheaper Hvac and ductwork.
The idea that it will depreciate..... well, I have refinanced a "manufactured home" 3 times over the last 25 years, cashing out more than the house initially cost, and now selling it, again making more in profit than it cost (all said, increasing in value about $250K over 25 years). It is (and has been) considered to be "real estate property" since day one of being set on a permanent foundation. It has a conventional mortgage, and the buyers are purchasing it with a conventional mortgage.
Yes, I have seen other manufactured homes totally deteriorated beyond repair, getting selling prices basically what the land is worth. It all depends on how well it was maintained and how good it was initially built. (Buying a $50K unit vs. $100K unit).
I have also seen stick built houses with cracked foundations, cracking floor tiles, cracked drywall, and the best one ever.... a weed growing out from between the baseboard and the carpet from the outside .... this was on a brand new $300K site built house! That 'builder' was a hurry up, get it done, use the cheapest labor, etc... type of builder....