How bad did I mess up?

Well, today was a pretty sucky day at work. Had my 1:1 with my boss which seemed to be going fine. At the end, he said he one more thing we should discuss. He describes how a few weeks ago he had to come in late to help with some equipment thing. He then said the next morning he noticed we walked in around the same time (8:45am). At the end of the day, I left work sometime around 3:45pm. I guess he noticed this too and it got him thinking.

He then asks me about this essentially. I say I don't remember the specifics of that day exactly (since it's two weeks ago), but to be honest I've been getting to work a bit before our daily meeting (8:30am) and leaving typically before 4pm. I didn't say how long this has been going on exactly (and he didn't ask). He said he appreciated my honesty but that that wasn't cool. They pay me for 40 hours and that is the expectation. (I'm salary but still the point stands).

He asked the security shack to pull my badge data for December and January to see if he had just noticed an off day or what. It came back essentially as I described. He was disappointed that no weeks in that span were at 40 hours. He said that this needs to change and was again just kind of asking what's up with this.

For context, he's aware I'm taking more college classes at the moment. He also knows I commute 40 minutes in and have a couple of young kids.

Our youngest has been a much worse sleeper than our first was, and I am adjusting still to having a spouse who stays at home. My wife has been firm about needing me home by 4:30. This has led to short days when I get into work later than I should (as time has went on, my start time has slowly drifted from 7:15 to closer to 8:30).

This is purely my fault and I took ownership of it in our discussion. The plan is to check in in two weeks to see if I've made good adjustments/improvements. The word PIP didn't come up but he did say he'd document this discussion so it's noted.

I feel horrible. I'm letting my wife and kids down. Letting my boss down. Letting myself down. I guess I fell for the notion that since my projects kept moving along well and I'm on call and answering the phone as needed that there wasn't a need to worry. I'm disappointed in myself I let things slide so far that this was a conversation that really happened.

A couple questions: - how damning is something like this in a file? I've interviewed for an internal job in the past (all be it remote so no commute concerns). Now I'm concerned this will follow me forever internally, even after this job - has anyone else been through something like this and been able to bounce back / earn your boss's trust again? - should I be job hunting now?

My wife and I have discussed and made a plan. Implementing a bedtime for myself (11pm), being okay with making up the 8+ hrs even if there's a late start for some reason, etc. I'm not sure how all this will work with balancing classes but we'll see. She's disappointed in me and I understand.

Also of note: my job is in engineering and while some can be done remote, management is a staunch believer in being on site to support equipment needs