Is it better to contact a publisher early in the writing process so that the editor can be involved in shaping the project, or is it better to submit a full academic book manuscript? In my case, this would be for a first academic book. If this is something that is dependent on particular academic fields my field is digital humanities.
Book writing is a very thankless task—it takes a long time, and the profits probably don't make up for the cost of the time it takes you to write the book, unless you happen to write a textbook that becomes the default for a field. On the other hand, in some disciplines (particularly in the humanities), a published book is practically a requirement for tenure, so you'll want to make sure that you do things right.
So my advice would depend upon where you are in the process. If you haven't already started writing, I'd shop around a prospective outline of the book plus an introductory chapter or two before you get too much further. Then you'll have a sense of what the publishers would be interested in. If you've gotten a lot written, then you just need to start shopping the full idea around.
I don't know what is better, but I think it depends on where you want to publish. I can only talk about my limited experience, hoping it will be helpful.
I've published a book with the MIT Press, and when my coauthors and I decided to contact them, the book was far from finished, but we had enough content for them to have an idea of what to expect -- which was one of their requirements. We then had to answer questions to help them decide whether or not our project would be worth their time and investment and to tell them when we would be done with the final (preprint) version of our manuscript.
They haven't been involved at all in shaping the project as you say, although they did a wonderful job of proofreading the final text. Which was a relief, given that none of us are native English speakers. But I have the feeling that publishers typically limit themselves to that job.