It is hard to say. A new vehicle with a new battery... The battery might be able to keep enough charge to start the vehicle after 5 weeks of no use. But the discharge the battery experiences would cause the battery to suffer some shortening of its service life. Car batteries don't like to be discharged too much.
If I were you I would be very reluctant to remove the battery and take it into a flat and connect to a battery maintainer and leave connected while I was away. Whenever I travel I disconnect all electrical devices like phone/iPad/laptop chargers, or any electrical device that remains even partially on while "off". This means the WIFI modem, printer, TV, etc. The only things that remain plugged in is the fridge/freezer, the stove/oven. The furnace I leave on but I set the thermostat down to 60F.
I'd be reluctant to taking the battery into a flat and setting the battery somewhere.
A solar powered battery charger would require this be on or near the car and connected to the battery's charging connections. This means the car could possibly be unlocked. You'd have to look into the details of connecting a solar powered battery charger to the car.
The presence of a solar powered battery charger would be an attractive theft target at least in some areas. And an unlocked car... Oh my.
For some cars the owners manual offers guidance on how to set up a vehicle for long term lack of use. What long term means varies.
For example with one car I used to own the owners manual had this:
Taking the vehicle out of service
When the vehicle is shut down for longer than three months, special measures must be taken. For more information, contact an authorized service center or another qualified service center or repair shop.
So you would need to see what your car's owners manual has to offer on this subject and if referred to an authorized service center follow up with it to learn what special measures one needs to follow.
There is probably the the recommendation to inflating the tires to above the normal pressures -- but not above the maximum pressure molded into the sidewall of the tires! -- to prevent the tires from flat spotting while sitting for 20 weeks.
Beyond that...you need to research this for your particular car.
If you leave the car parked with the battery in it before you leave be sure you know how to get at the battery or the jump starting connections should you return and the battery is flat.
When you return arrange to remove the battery and have it charged somewhere.
Or when you return you can use a portable car battery jump starter to start the engine. But it is important to then run the engine long enough to bring the battery up to full charge. Don't know how long this would take. And what this extended charging session required of the alternator would do to the alternator.
Really I'd prefer I think to arrange to get the battery charged then start the engine.
Or if you have someone you trust request that someone arrange to drive the car 30 minutes every week/2 weeks while you are gone.