Preheat oven to 180 degrees Celsius / 356 degrees Fahrenheit
Grease a deep baking dish and set it aside, in a medium saucepan, melt butter over medium heat, Add flour, salt, pepper, and Italian seasoning and cook, stirring frequently, until mixture is pale golden for about 5 minutes.
Whisking constantly, pour in 2 ½ cups of milk, cook for a few minutes and add the remaining 2 ½ cups of milk, whisk until smooth, then cook mixture stirring constantly until it starts to boil.
Reduce heat to low and simmer gently, stirring occasionally, until the sauce thickens and is very creamy about 8 to 10 minutes (Be careful it does not burn), taste, and adjust for salt and pepper.
Remove from heat and stir in 1 ½ cup of shredded cheese until melted
In the prepared bowl, add a layer of sliced onions and then potatoes then alternatively with the bechamel sauce, top with the remaining 1 cup of mozzarella cheese and transfer the dish into the oven.
Bake for 1 hour or 1 hour and 10 minutes until the potatoes are tender.