Why would both 'Matthew' and 'Luke' invent stories that have Jesus growing up in Nazareth? Matthew's gospel has the family apparently living in Bethlehem but having to relocate to Nazareth (via Egypt) to avoid Archelaus. Luke's had them living in Nazareth, with the census story to put them in Bethlehem for the birth to fulfil prophecy.
If Jesus was entirely fictional, why wouldn't the authors just have Jesus growing up in Bethlehem? If Jesus was based on a real person who people knew came from Nazareth, the stories above make some kind of sense, in order to have him born in Bethlehem but grow up in Nazareth.