The 49ers withstood a second-half rally by Washington and moved to 6-0 for the first time since 2019, when they opened with eight straight wins.