There was a thread on this topic not too long ago. Actually I think there are a few threads on this.
There is no definitive answer to your question, and your entry into Japan is at the discretion of the immigration officer who looks at your passport as you enter the country.
Leaving the country and coming back to "renew" the three-month landing permission is a very old trick. In fact it is now almost a cliche. I wouldn't assume that it is not a problem. I would assume it is your primary problem.
If you have an itinerary that brings you to Japan for 3 months, then on to another country, and then back through Japan, I think your chances of doing as you plan are increased. By itinerary I mean not only plane tickets, but activities and lodgings, internal travel, and finances to support the trip. Note that immigration isn't obliged to let you enter, even with such a plan.
If you come with a vague plan to stay a while, and then leave the country and return with another vague plan, it looks suspicious.
This is a common topic on Japanese forums. The capriciousness of Japanese immigration prohibits any of us from giving you a clear answer. Every case is unique. Some people leave Japan for the weekend and then have no problem coming back. Other people have been grilled at immigration only to be turned away. My gut feeling is that genuine travelers with a plan to visit the various Japanese tourist sites are treated with generosity.